fix: json stringify

This commit is contained in:
Vlad Stan
2024-10-17 10:42:27 +02:00
committed by dni ⚡
parent 1330290713
commit 75698bfd5c
+1 -1
View File
@@ -613,7 +613,7 @@ def model_to_dict(model: BaseModel) -> dict:
if isinstance(value, datetime.datetime):
_dict[key] = value.timestamp()
continue
if type(type_) is type(BaseModel):
if type(type_) is type(BaseModel) or type_ is dict:
_dict[key] = json.dumps(value)
continue
_dict[key] = value