Skip to content

Commit

Permalink
Minor code change after review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebek committed Nov 6, 2023
1 parent 5600e0c commit fba1813
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui/threedi_plugin_grid_result_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def refresh(self):
for schematisation_id, local_schematisation in local_schematisations.items():
# Iterate over revisions
for revision_number, local_revision in local_schematisation.revisions.items():
num_of_results = len(local_revision.results_dirs)
# Iterate over results
for result_dir in local_revision.results_dirs:
schema_item = QStandardItem(local_schematisation.name)
Expand All @@ -218,7 +219,7 @@ def refresh(self):
self.model.appendRow([schema_item, revision_item, result_item])

# In case no results are present, but a gridadmin is present, we still add the grid, but without result item
if len(local_revision.results_dirs) == 0 and os.path.exists(os.path.join(local_revision.grid_dir, "gridadmin.h5")):
if num_of_results == 0 and os.path.exists(os.path.join(local_revision.grid_dir, "gridadmin.h5")):
schema_item = QStandardItem(local_schematisation.name)
schema_item.setEditable(False)
revision_item = QStandardItem(str(revision_number))
Expand Down

0 comments on commit fba1813

Please sign in to comment.