Skip to content

Commit 26986be

Browse files
committed
Fix checking for empty as opposed to None in object retrieval
1 parent 8571492 commit 26986be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simvue/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def get_runs(
342342
f"but got '{type(json_response)}'"
343343
)
344344

345-
if response_data := json_response.get("data"):
345+
if (response_data := json_response.get("data")) is not None:
346346
return response_data
347347
elif output_format == "dataframe":
348348
return to_dataframe(response.json())
@@ -877,7 +877,7 @@ def get_folders(
877877
f"but got '{type(json_response)}'"
878878
)
879879

880-
if not (data := json_response.get("data")):
880+
if (data := json_response.get("data")) is None:
881881
raise RuntimeError(
882882
"Expected key 'data' in response during folder retrieval"
883883
)

0 commit comments

Comments
 (0)