From 5e39f607ae03fe696a33bdd2e7fea92be250321b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20R=2E=20Sede=C3=B1o?= Date: Tue, 18 Feb 2025 11:01:43 -0500 Subject: [PATCH] fix possible use before assignment --- roost_backend/authentication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/roost_backend/authentication.py b/roost_backend/authentication.py index 5ca89fc..b5811d8 100644 --- a/roost_backend/authentication.py +++ b/roost_backend/authentication.py @@ -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