Skip to content

Commit

Permalink
Fix bug that would be triggered upon code refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
csadorf committed Jul 19, 2021
1 parent 5324334 commit b7d8243
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aiidalab_qe/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ def _set_num_mpi_tasks_to_default(self, _=None):

def _check_resources(self):
"""Check whether the currently selected resources will be sufficient and warn if not."""
if not self.codes_selector.pw.selected_code:
return # No code selected, nothing to do.

num_mpi_tasks = self.resources_config.num_mpi_tasks.value
on_localhost = (
self.codes_selector.pw.selected_code.computer.get_hostname() == "localhost"
Expand Down

0 comments on commit b7d8243

Please sign in to comment.