Skip to content

Commit

Permalink
More Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewglanz committed Nov 3, 2023
1 parent 09640ee commit 137d5e4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ACMAS/app/ACMAS_Web/management/commands/create_groups.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import logging

from django.contrib.auth.models import Group, Permission
from django.core.management.base import BaseCommand
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission

GROUPS = ["Moderators", "APO"]
MODELS = ["question", "university", "course", "uploadedfile", "moderationqueue"]
Expand All @@ -24,11 +22,11 @@ def handle(self, *args, **options):
try:
model_add_perm = Permission.objects.get(name=name)
except Permission.DoesNotExist:
logging.warning("Permission not found with name '{}'.".format(name))
logging.warning(
"Permission not found with name '{}'.".format(name)
)
continue

new_group.permissions.add(model_add_perm)

print("Created default group and permissions.")


0 comments on commit 137d5e4

Please sign in to comment.