From 7322eac7b99b5b692c7f81f9efbdae4704ce5c05 Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Mon, 4 Mar 2024 11:53:32 -0800 Subject: [PATCH] Null check for streamlit visualizer (#26) --- streamlit_app/visualizer/api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/streamlit_app/visualizer/api.py b/streamlit_app/visualizer/api.py index 328d33ef..a417f9be 100644 --- a/streamlit_app/visualizer/api.py +++ b/streamlit_app/visualizer/api.py @@ -63,7 +63,12 @@ class SkyvernClient: response = requests.get(url, params=params, headers=headers) steps = response.json() for step in steps: - if "output" in step and "actions_and_results" in step["output"]: + if ( + "output" in step + and step["output"] is not None + and "actions_and_results" in step["output"] + and step["output"]["actions_and_results"] is not None + ): step["output"]["actions_and_results"] = json.dumps(step["output"]["actions_and_results"]) return steps