Browse Source

🎨 Auto format

pull/13803/head
pre-commit-ci-lite[bot] 5 months ago
committed by GitHub
parent
commit
3c1866474d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      fastapi/encoders.py

6
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,

Loading…
Cancel
Save