Skip to content

Commit

Permalink
Guard against null process states
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 4, 2025
1 parent 59d6c4f commit e5a8d61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiidalab_widgets_base/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ def _walk_tree(cls, root):
def _update_tree_node(self, tree_node):
if isinstance(tree_node, AiidaProcessNodeTreeNode):
process_node = orm.load_node(tree_node.pk)
if process_node.process_state is None:
return
tree_node.name = calc_info(process_node)
# Override the process state in case that the process node has failed:
# (This could be refactored with structural pattern matching with py>=3.10.)
Expand Down

0 comments on commit e5a8d61

Please sign in to comment.