Skip to content

Commit 2c06cc8

Browse files
committed
Fix ambiguity issue with numpy artifact retrieval
1 parent 13e35bf commit 2c06cc8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

simvue/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,9 @@ def get_artifact(
641641
response.content, mimetype, allow_pickle
642642
)
643643

644-
return content or response.content
644+
# Numpy array return means just 'if content' will be ambiguous
645+
# so must explicitly check if None
646+
return response.content if content is None else content
645647

646648
@prettify_pydantic
647649
@pydantic.validate_call

0 commit comments

Comments
 (0)