diff --git a/components/crud-web-apps/jupyter/backend/apps/common/status.py b/components/crud-web-apps/jupyter/backend/apps/common/status.py index c2a2a6fe1..ed4ea65c8 100644 --- a/components/crud-web-apps/jupyter/backend/apps/common/status.py +++ b/components/crud-web-apps/jupyter/backend/apps/common/status.py @@ -133,9 +133,9 @@ def get_status_from_container_state(notebook): # If the Notebook is initializing, the status will be waiting waiting_state = container_state["waiting"] - if ["reason"] == 'PodInitializing': + if waiting_state["reason"] == 'PodInitializing': status_phase = status.STATUS_PHASE.WAITING - status_message = waiting_state.get("reason", "Undetermined reason.") + status_message = waiting_state["reason"] return status_phase, status_message # In any other case, the status will be warning with a "reason: diff --git a/components/crud-web-apps/jupyter/backend/apps/common/status_test.py b/components/crud-web-apps/jupyter/backend/apps/common/status_test.py index 157409195..16a4c5d85 100644 --- a/components/crud-web-apps/jupyter/backend/apps/common/status_test.py +++ b/components/crud-web-apps/jupyter/backend/apps/common/status_test.py @@ -47,6 +47,6 @@ def test_no_message_container_state(self): self.assertEqual( status.get_status_from_container_state(container_state), - ("warning", - "PodInitializing: No available message for container state.") + ("waiting", + "PodInitializing") )