diff --git a/backend/accounts/views.py b/backend/accounts/views.py index 558e3e9..5c9a9e0 100644 --- a/backend/accounts/views.py +++ b/backend/accounts/views.py @@ -518,9 +518,13 @@ def post(self, request, format=None): ).exclude(codename="penn_clubs_admin") for perm in perms: perm.user_set.clear() - User.objects.filter(Q(is_superuser=True) | Q(is_staff=True)).update( - is_superuser=False, is_staff=False - ) + + clubs_admins = Permission.objects.get( + content_type=content_type, codename="penn_clubs_admin" + ).user_set.all() + User.objects.filter(Q(is_superuser=True) | Q(is_staff=True)).exclude( + pk__in=clubs_admins + ).update(is_superuser=False, is_staff=False) try: body = json.loads(request.body)