Sebastián Ramírez
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
fastapi/encoders.py
|
|
|
@ -219,9 +219,9 @@ def jsonable_encoder( |
|
|
|
if isinstance(obj, encoder_type): |
|
|
|
return encoder_instance(obj) |
|
|
|
if include is not None and not isinstance(include, (set, dict)): |
|
|
|
include = set(include) |
|
|
|
include = set(include) # type: ignore[assignment] |
|
|
|
if exclude is not None and not isinstance(exclude, (set, dict)): |
|
|
|
exclude = set(exclude) |
|
|
|
exclude = set(exclude) # type: ignore[assignment] |
|
|
|
if isinstance(obj, BaseModel): |
|
|
|
obj_dict = obj.model_dump( |
|
|
|
mode="json", |
|
|
|
|