mirror of https://github.com/tiangolo/fastapi.git
Update _compat.py
Fix _compat.is_uploadfile_sequence_annotation
This commit is contained in:
parent
c1adce4fe9
commit
52a483704a
|
|
@ -623,7 +623,8 @@ def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
|
|||
at_least_one = True
|
||||
continue
|
||||
return at_least_one
|
||||
return field_annotation_is_sequence(annotation) and all(
|
||||
args = get_args(annotation)
|
||||
return field_annotation_is_sequence(annotation) and args and all(
|
||||
is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
|
||||
for sub_annotation in get_args(annotation)
|
||||
for sub_annotation in args
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue