Skip to content

Commit

Permalink
Silence warning (#647)
Browse files Browse the repository at this point in the history
Recent developments in aiidalab-home of an external notebook to manage codes run into an issue with the AWB computational resources widgets when used without a default calcjob plugin. This PR silences a suspected false warning for now, to be properly investigated in a future PR.
  • Loading branch information
edan-bainglass authored Dec 21, 2024
1 parent fd8c1b0 commit 0542daa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aiidalab_widgets_base/computational_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,13 @@ def _observe_code_setup(self, _=None):
for key, value in self.code_setup.items():
if hasattr(self, key):
if key == "default_calc_job_plugin":
if "None" in value:
# NOTE: Using this widget through the `_ResourceSetupBaseWidget`
# without an explicit `default_calc_job_plugin` causes `value`
# to be "<plugin>.None", which is not a valid plugin name.
# HACK to avoid the warning message
# TODO see https://github.com/aiidalab/aiidalab-widgets-base/issues/648
return
try:
self.default_calc_job_plugin.value = value
except tl.TraitError:
Expand Down

0 comments on commit 0542daa

Please sign in to comment.