mirror of https://github.com/tiangolo/fastapi.git
Format
This commit is contained in:
parent
265a0fec60
commit
8033b02f64
|
|
@ -735,9 +735,8 @@ def _get_multidict_value(
|
|||
if form_input:
|
||||
# Special handling for form inputs:
|
||||
# Treat empty strings or empty lists as missing values
|
||||
if (
|
||||
(isinstance(value, str) and value == "")
|
||||
or (is_sequence_field(field) and len(value) == 0)
|
||||
if (isinstance(value, str) and value == "") or (
|
||||
is_sequence_field(field) and len(value) == 0
|
||||
):
|
||||
return None
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue