mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
updated linter length; linter reformatted several files
This commit is contained in:
parent
f0636013e0
commit
c760417e6a
65 changed files with 550 additions and 1727 deletions
|
@ -87,14 +87,10 @@ class UserGroup(Group):
|
|||
permissions = permission["permissions"]
|
||||
|
||||
# Retrieve the content type for the app and model
|
||||
content_type = ContentType.objects.get(
|
||||
app_label=app_label, model=model_name
|
||||
)
|
||||
content_type = ContentType.objects.get(app_label=app_label, model=model_name)
|
||||
|
||||
# Retrieve the permissions based on their codenames
|
||||
permissions = Permission.objects.filter(
|
||||
content_type=content_type, codename__in=permissions
|
||||
)
|
||||
permissions = Permission.objects.filter(content_type=content_type, codename__in=permissions)
|
||||
|
||||
# Assign the permissions to the group
|
||||
cisa_analysts_group.permissions.add(*permissions)
|
||||
|
@ -113,9 +109,7 @@ class UserGroup(Group):
|
|||
)
|
||||
|
||||
cisa_analysts_group.save()
|
||||
logger.debug(
|
||||
"CISA Analyt permissions added to group " + cisa_analysts_group.name
|
||||
)
|
||||
logger.debug("CISA Analyt permissions added to group " + cisa_analysts_group.name)
|
||||
except Exception as e:
|
||||
logger.error(f"Error creating analyst permissions group: {e}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue