Merge branch 'master' of gitlab.prodcontest.ru:team-15/project

This commit is contained in:
ITQ
2025-03-01 23:26:21 +03:00
+4 -1
View File
@@ -19,7 +19,10 @@ class BearerAuth(HttpBearer):
except Exception: except Exception:
raise AuthenticationError raise AuthenticationError
user = User.objects.get(id=data["id"]) try:
user = User.objects.get(id=data["id"])
except User.DoesNotExist:
raise AuthenticationError
return user return user
@staticmethod @staticmethod