Skip to content

Commit

Permalink
Fix ComputationalResourcesDatabaseWidget (#601)
Browse files Browse the repository at this point in the history
When the code is not present in the default machine it should still work.
  • Loading branch information
yakutovicha authored May 15, 2024
1 parent 7ce8d02 commit e77ba92
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions aiidalab_widgets_base/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,7 @@ def _database_generator(database_source, default_calc_job_plugin):
if len(domain_value) == 0:
# remove domain since no computers with required codes defined in this domain source
del database[domain]
continue

if domain_value["default"] not in domain_value:
elif domain_value.get("default") not in domain_value:
# make sure default computer is still points to existing computer
domain_value["default"] = sorted(domain_value.keys() - {"default"})[0]

Expand Down

0 comments on commit e77ba92

Please sign in to comment.