Skip to content

Commit a2cca41

Browse files
committed
fix initialization of proposition widget
1 parent ac476c3 commit a2cca41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arho_feature_template/gui/components/plan_proposition_widget.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ def __init__(self, proposition: Proposition, parent=None):
6060

6161
self.name.setText(proposition.name)
6262
self.text_input.setText(proposition.value)
63-
self._add_theme(proposition.theme_id)
64-
self._add_proposition_number(proposition.proposition_number)
63+
if proposition.theme_id:
64+
self._add_theme(proposition.theme_id)
65+
if proposition.proposition_number:
66+
self._add_proposition_number(proposition.proposition_number)
6567

6668
def _add_widgets(self, label: QLabel, widget: QWidget):
6769
self.form_layout.addRow(label, widget)

0 commit comments

Comments
 (0)