Browse Source

commit Yurii's suggestion

Co-authored-by: Motov Yurii <[email protected]>
pull/15091/head
Sofie Van Landeghem 4 months ago
committed by GitHub
parent
commit
bf2a8117a4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      fastapi/dependencies/utils.py

5
fastapi/dependencies/utils.py

@ -829,9 +829,8 @@ def request_params_to_args(
for key in received_params.keys():
if key not in processed_keys:
getlist = getattr(received_params, "getlist", None)
if callable(getlist):
value = getlist(key)
if isinstance(received_params, (ImmutableMultiDict, Headers)):
value = received_params.getlist(key)
if isinstance(value, list) and (len(value) == 1):
params_to_process[key] = value[0]
else:

Loading…
Cancel
Save