Skip to content

Commit

Permalink
♻ Simplify conditional assignment in fastapi/dependencies/utils.py (#…
Browse files Browse the repository at this point in the history
…4597)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
  • Loading branch information
cikay and tiangolo committed Aug 26, 2022
1 parent 75792eb commit c812449
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fastapi/dependencies/utils.py
Expand Up @@ -302,10 +302,7 @@ def get_dependant(
assert is_scalar_field(
field=param_field
), "Path params must be of one of the supported types"
if isinstance(param.default, params.Path):
ignore_default = False
else:
ignore_default = True
ignore_default = not isinstance(param.default, params.Path)
param_field = get_param_field(
param=param,
param_name=param_name,
Expand Down

0 comments on commit c812449

Please sign in to comment.