Skip to content

Commit

Permalink
🎨 Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joyliu-q committed Nov 3, 2024
1 parent cf3343f commit b4e821b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,13 @@ def post(self, request, format=None):
).exclude(codename="penn_clubs_admin")
for perm in perms:
perm.user_set.clear()
penn_clubs_admin_permission = Permission.objects.get(codename="penn_clubs_admin")
penn_clubs_admin_permission = Permission.objects.get(
codename="penn_clubs_admin"
)
users_to_reset = User.objects.filter(
Q(is_superuser=True) | Q(is_staff=True)
).exclude(
Q(user_permissions=penn_clubs_admin_permission) |
Q(is_superuser=True)
Q(user_permissions=penn_clubs_admin_permission) | Q(is_superuser=True)
)
users_to_reset.update(is_superuser=False, is_staff=False)

Expand Down

0 comments on commit b4e821b

Please sign in to comment.