Skip to content

Commit

Permalink
Fix database locking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
soininen committed Jan 31, 2025
1 parent fcd005e commit 97b6b56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spinetoolbox/spine_db_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,8 @@ def get_parameter_value_list(self, db_map, id_, role=Qt.ItemDataRole.DisplayRole
]

def get_scenario_alternative_id_list(self, db_map, scen_id):
scen = self.get_item(db_map, "scenario", scen_id)
with self._db_locks[db_map]:
scen = self.get_item(db_map, "scenario", scen_id)
return scen["alternative_id_list"] if scen else []

def import_data(self, db_map_data, command_text="Import data"):
Expand Down

0 comments on commit 97b6b56

Please sign in to comment.