Skip to content

Commit

Permalink
Merge pull request #437 from jaap3/patch-2
Browse files Browse the repository at this point in the history
Consistently use AuthorizationCode model
  • Loading branch information
lepture committed Mar 16, 2022
2 parents 51c1b72 + 0fd8221 commit 349a8c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/django/2/grants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ grant type. Here is how::

def query_authorization_code(self, code, client):
try:
item = OAuth2Code.objects.get(code=code, client_id=client.client_id)
except OAuth2Code.DoesNotExist:
item = AuthorizationCode.objects.get(code=code, client_id=client.client_id)
except AuthorizationCode.DoesNotExist:
return None

if not item.is_expired():
Expand Down

0 comments on commit 349a8c3

Please sign in to comment.