Browse Source

🎨 Auto format

pull/15584/head
pre-commit-ci-lite[bot] 2 weeks ago
committed by GitHub
parent
commit
f84ced1f99
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      fastapi/dependencies/utils.py

6
fastapi/dependencies/utils.py

@ -931,7 +931,11 @@ def request_params_to_args(
for err in exc.errors(include_url=False):
err_loc = list(err["loc"])
if err_loc and isinstance(err_loc[0], str) and err_loc[0] in name_to_alias:
if (
err_loc
and isinstance(err_loc[0], str)
and err_loc[0] in name_to_alias
):
err_loc[0] = name_to_alias[err_loc[0]]
err["loc"] = (field_in, *err_loc)

Loading…
Cancel
Save