From a27c828ba162f33732c0175a865b22a1d3c8f42d Mon Sep 17 00:00:00 2001 From: Tore Brede <Tore.Brede@uib.no> Date: Thu, 7 Oct 2021 14:01:45 +0200 Subject: [PATCH] GREG-60: Fixing wrong argument --- greg/permissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/greg/permissions.py b/greg/permissions.py index da7940a5..4854b4b1 100644 --- a/greg/permissions.py +++ b/greg/permissions.py @@ -6,7 +6,7 @@ from gregui.models import GregUserProfile class IsSponsor(BasePermission): def has_permission(self, request, view): try: - user = GregUserProfile.objects.get(user=request.user.id) + user = GregUserProfile.objects.get(user=request.user) return bool(user.sponsor) except GregUserProfile.DoesNotExist: return False -- GitLab