Browse Source

Update fastapi/dependencies/utils.py

Co-authored-by: Copilot <[email protected]>
pull/12944/head
Yurii Karabas 5 months ago
committed by GitHub
parent
commit
b61128b071
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      fastapi/dependencies/utils.py

2
fastapi/dependencies/utils.py

@ -196,7 +196,7 @@ def _get_flat_fields_from_params(fields: List[ModelField]) -> List[ModelField]:
fields_to_extract = []
for f in fields:
if _is_model_class(first_field.type_):
if _is_model_class(f.type_):
fields_to_extract.extend(get_cached_model_fields(f.type_))
else:
fields_to_extract.append(f)

Loading…
Cancel
Save