mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Run linter and formatting changes
This commit is contained in:
parent
67dacffa9f
commit
ecc4d6c89e
4 changed files with 13 additions and 4 deletions
|
@ -342,6 +342,12 @@ class DomainInvitationAdmin(ListHeaderAdmin):
|
||||||
]
|
]
|
||||||
search_help_text = "Search by email or domain."
|
search_help_text = "Search by email or domain."
|
||||||
|
|
||||||
|
# Mark the FSM field 'status' as readonly
|
||||||
|
# to allow admin users to create Domain Invitations
|
||||||
|
# without triggering the FSM Transition Not Allowed
|
||||||
|
# error.
|
||||||
|
readonly_fields = ["status"]
|
||||||
|
|
||||||
|
|
||||||
class DomainInformationAdmin(ListHeaderAdmin):
|
class DomainInformationAdmin(ListHeaderAdmin):
|
||||||
"""Customize domain information admin class."""
|
"""Customize domain information admin class."""
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
# step 3: fake run the latest migration in the migrations list
|
# step 3: fake run the latest migration in the migrations list
|
||||||
# [RECOMMENDED]
|
# [RECOMMENDED]
|
||||||
# Alternatively:
|
# Alternatively:
|
||||||
# Only step: duplicate the migration that loads data and run: docker-compose exec app ./manage.py migrate
|
# step 1: duplicate the migration that loads data
|
||||||
|
# step 2: docker-compose exec app ./manage.py migrate
|
||||||
|
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
from registrar.models import UserGroup
|
from registrar.models import UserGroup
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
# step 3: fake run the latest migration in the migrations list
|
# step 3: fake run the latest migration in the migrations list
|
||||||
# [RECOMMENDED]
|
# [RECOMMENDED]
|
||||||
# Alternatively:
|
# Alternatively:
|
||||||
# Only step: duplicate the migration that loads data and run: docker-compose exec app ./manage.py migrate
|
# step 1: duplicate the migration that loads data
|
||||||
|
# step 2: docker-compose exec app ./manage.py migrate
|
||||||
|
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
from registrar.models import UserGroup
|
from registrar.models import UserGroup
|
||||||
|
|
|
@ -31,7 +31,8 @@ class TestGroups(TestCase):
|
||||||
UserGroup.objects.filter(name="full_access_group"), [full_access_group]
|
UserGroup.objects.filter(name="full_access_group"), [full_access_group]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Test permissions data migrations for cisa_analysts_group ran as expected
|
# Test data migrations for cisa_analysts_group permission
|
||||||
|
# ran as expected.
|
||||||
# Define the expected permission codenames
|
# Define the expected permission codenames
|
||||||
expected_permissions = [
|
expected_permissions = [
|
||||||
"view_logentry",
|
"view_logentry",
|
||||||
|
@ -43,7 +44,7 @@ class TestGroups(TestCase):
|
||||||
"analyst_access_permission",
|
"analyst_access_permission",
|
||||||
"change_user",
|
"change_user",
|
||||||
"add_domaininvitation",
|
"add_domaininvitation",
|
||||||
"view_domaininvitation"
|
"view_domaininvitation",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Get the codenames of actual permissions associated with the group
|
# Get the codenames of actual permissions associated with the group
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue