Skip to content

Commit

Permalink
Fix process-node-related bugs (#967)
Browse files Browse the repository at this point in the history
This PR handles a couple of bugs related to the process node, specifically loading node views and managing the process state.
  • Loading branch information
edan-bainglass authored Dec 10, 2024
1 parent 9a814ac commit 5949bdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/aiidalab_qe/app/result/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def _update_node_view(self, nodes, refresh=False):
self.node_view_container.children = [self.node_view_loading_message]
self.node_view = self._create_workchain_viewer(node)
self.node_views[node.uuid] = self.node_view
else:
self.node_view = ipw.HTML("No viewer available for this node.")

self.node_view_container.children = [self.node_view]

Expand Down
6 changes: 5 additions & 1 deletion src/aiidalab_qe/common/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,11 @@ def _get_child_process_status(self, child="this"):
"""

def _get_child_state_and_exit_message(self, child="this"):
if not (node := self._fetch_child_process_node(child)):
if not (
(node := self._fetch_child_process_node(child))
and hasattr(node, "process_state")
and node.process_state
):
return "queued", None
if node.is_failed:
return "failed", node.exit_message
Expand Down

0 comments on commit 5949bdf

Please sign in to comment.