Skip to content

Commit

Permalink
Merge branch 'main' into plugin/api_add_update_input
Browse files Browse the repository at this point in the history
  • Loading branch information
superstar54 authored Apr 11, 2024
2 parents ce9f4f0 + dcb951d commit e57e619
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/aiidalab_qe/app/submission/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ def _get_code_uuid(code):

with self.hold_trait_notifications():
for name, code in self.codes.items():
code.value = _get_code_uuid(codes.get(name))
# check if the code is installed and usable
# note: if code is imported from another user, it is not usable and thus will not be
# treated as an option in the ComputationalResourcesWidget.
code_options = [o[1] for o in self.pw_code.code_select_dropdown.options]
if _get_code_uuid(codes.get(name)) in code_options:
code.value = _get_code_uuid(codes.get(name))

def update_codes_display(self):
"""Hide code if no related property is selected."""
Expand Down

0 comments on commit e57e619

Please sign in to comment.