Skip to content

Commit

Permalink
fix: do not convert bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
joein committed Apr 19, 2024
1 parent 31ad14c commit 477371d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qdrant_client/local/local_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ def convert_nan_inf_to_null(obj: Any) -> Any:
if isinstance(obj, dict):
return {k: convert_nan_inf_to_null(v) for k, v in obj.items()}

if isinstance(obj, str) or isinstance(obj, bytes) or isinstance(obj, range):
return obj

# pydantic converts iterables to lists
elif isinstance(obj, Iterable) and not (isinstance(obj, str) or isinstance(obj, range)):
if isinstance(obj, Iterable):
return [convert_nan_inf_to_null(v) for v in obj]

return obj
Expand Down

0 comments on commit 477371d

Please sign in to comment.