We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1876bbc commit faa138eCopy full SHA for faa138e
app/api/v1/utils.py
@@ -19,6 +19,8 @@ def sanitize_for_json(obj: Any) -> Any:
19
return obj.isoformat()
20
elif hasattr(obj, "__dict__"): # Handle objects with __dict__
21
return sanitize_for_json(obj.__dict__)
22
+ elif isinstance(obj, bool): # Handle boolean objects (before float conversion)
23
+ return obj
24
# Handle Decimal objects from database
25
elif hasattr(obj, "__float__"):
26
return float(obj)
0 commit comments