Skip to content

Commit e77ba92

Browse files
authored
Fix ComputationalResourcesDatabaseWidget (#601)
When the code is not present in the default machine it should still work.
1 parent 7ce8d02 commit e77ba92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

aiidalab_widgets_base/databases.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ def _database_generator(database_source, default_calc_job_plugin):
353353
if len(domain_value) == 0:
354354
# remove domain since no computers with required codes defined in this domain source
355355
del database[domain]
356-
continue
357-
358-
if domain_value["default"] not in domain_value:
356+
elif domain_value.get("default") not in domain_value:
359357
# make sure default computer is still points to existing computer
360358
domain_value["default"] = sorted(domain_value.keys() - {"default"})[0]
361359

0 commit comments

Comments
 (0)