mirror of https://github.com/tiangolo/fastapi.git
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
This commit is contained in:
parent
45fbe92dc7
commit
9c52f92f8c
|
|
@ -707,13 +707,10 @@ async def request_body_to_args(
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
errors.append(get_missing_field_error(loc))
|
errors.append(get_missing_field_error(loc))
|
||||||
continue
|
continue
|
||||||
if (
|
if value is None or (
|
||||||
value is None
|
isinstance(field_info, params.Form)
|
||||||
or (
|
and is_sequence_field(field)
|
||||||
isinstance(field_info, params.Form)
|
and len(value) == 0
|
||||||
and is_sequence_field(field)
|
|
||||||
and len(value) == 0
|
|
||||||
)
|
|
||||||
):
|
):
|
||||||
if field.required:
|
if field.required:
|
||||||
errors.append(get_missing_field_error(loc))
|
errors.append(get_missing_field_error(loc))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue