Browse Source

Merge a57a8e54fa into eb75fd078e

pull/15993/merge
Rahul Rao 4 days ago
committed by GitHub
parent
commit
8aad16d178
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      fastapi/security/oauth2.py

4
fastapi/security/oauth2.py

@ -350,7 +350,7 @@ class OAuth2(SecurityBase):
The dictionary of OAuth2 flows.
"""
),
] = OAuthFlowsModel(),
] = None,
scheme_name: Annotated[
str | None,
Doc(
@ -392,6 +392,8 @@ class OAuth2(SecurityBase):
),
] = True,
):
if flows is None:
flows = OAuthFlowsModel()
self.model = OAuth2Model(
flows=cast(OAuthFlowsModel, flows), description=description
)

Loading…
Cancel
Save