Skip to content

Commit

Permalink
fix possible use before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
asedeno committed Feb 18, 2025
1 parent 738a947 commit 5e39f60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions roost_backend/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def validate_token(cls, token, raise_on_jwt_error=True):
if claims is None:
return None, None

user = None
if 'identity' in claims:
user = models.User.objects.filter(**claims['identity']).first()
return claims, user
Expand Down

0 comments on commit 5e39f60

Please sign in to comment.