From da41f255a06516c1b7b85a587b982535cd7fec54 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Mon, 1 Mar 2021 16:56:02 +0300 Subject: Make Admin Fetch Async Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- backend/authentication/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/authentication/backend.py') diff --git a/backend/authentication/backend.py b/backend/authentication/backend.py index bdff796..206d1eb 100644 --- a/backend/authentication/backend.py +++ b/backend/authentication/backend.py @@ -61,7 +61,7 @@ class JWTAuthenticationBackend(authentication.AuthenticationBackend): raise authentication.AuthenticationError("Could not parse user details.") user = User(token, user_details) - if user.fetch_admin_status(request): + if await user.fetch_admin_status(request): scopes.append("admin") return authentication.AuthCredentials(scopes), user -- cgit v1.2.3