Hydraulic structure: fix crashing bug happening when we select the section combobox without selecting a reach in the first combobox

new_design_pol
Dylan Jeannin 2026-09-01 14:53:08 +02:00
parent 32db5795da
commit d6aeb5df21
1 changed files with 9 additions and 6 deletions

View File

@ -96,6 +96,9 @@ class ComboBoxDelegate(QItemDelegate):
reach = self._data.hydraulic_structures\ reach = self._data.hydraulic_structures\
.get_for_enabled_reaches(index.row())\ .get_for_enabled_reaches(index.row())\
.input_reach .input_reach
if reach is None:
value = None
else:
profiles = list( profiles = list(
filter( filter(
lambda p: p.display_name() == text, lambda p: p.display_name() == text,