Update fastapi/dependencies/utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Yurii Karabas 2026-02-05 21:11:36 +01:00 committed by GitHub
parent 6910a5ff33
commit b61128b071
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)