mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
Merge branch 'master' of gitlab.prodcontest.ru:team-15/project
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user