pre-commit-ci-lite[bot]
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
fastapi/encoders.py
|
|
|
@ -341,7 +341,11 @@ def jsonable_encoder( |
|
|
|
) |
|
|
|
return encoded_list |
|
|
|
|
|
|
|
if named_tuple_as_dict and getattr(obj, "_asdict", None) is not None and callable(obj._asdict): |
|
|
|
if ( |
|
|
|
named_tuple_as_dict |
|
|
|
and getattr(obj, "_asdict", None) is not None |
|
|
|
and callable(obj._asdict) |
|
|
|
): |
|
|
|
return jsonable_encoder( |
|
|
|
obj._asdict(), |
|
|
|
include=include, |
|
|
|
|