From e2589be15371c1b7365758b9e032bbcca14b1288 Mon Sep 17 00:00:00 2001 From: superstar54 Date: Wed, 10 Apr 2024 17:49:03 +0000 Subject: [PATCH] check if the code is installed and usable --- src/aiidalab_qe/app/submission/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aiidalab_qe/app/submission/__init__.py b/src/aiidalab_qe/app/submission/__init__.py index 478ebbf02..c56a1fccf 100644 --- a/src/aiidalab_qe/app/submission/__init__.py +++ b/src/aiidalab_qe/app/submission/__init__.py @@ -347,7 +347,9 @@ 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 + if _get_code_uuid(codes.get(name)) in code.code_select_dropdown.options: + code.value = _get_code_uuid(codes.get(name)) def update_codes_display(self): """Hide code if no related property is selected."""