Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Spence committed Dec 17, 2024
1 parent ec39b15 commit 24354fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/registrar/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2442,15 +2442,15 @@ def change_view(self, request, object_id, form_url="", extra_context=None):
obj_id = domain.id
change_url = reverse("admin:%s_%s_change" % (app_label, model_name), args=[obj_id])

message = f"<li>The status of this domain request cannot be changed because it has been joined to a domain in Ready status: " # noqa
message = f"<li>The status of this domain request cannot be changed because it has been joined to a domain in Ready status: " # noqa
message += f"<a href='{change_url}'>{domain}</a></li>"

message_html = mark_safe(message) # nosec
messages.warning(
request,
message_html,
)

obj = self.get_object(request, object_id)
self.display_restricted_warning(request, obj)

Expand Down Expand Up @@ -2564,6 +2564,7 @@ def get_queryset(self, request):
qs = qs.filter(portfolio=portfolio_id)
return qs


class TransitionDomainAdmin(ListHeaderAdmin):
"""Custom transition domain admin class."""

Expand Down
5 changes: 2 additions & 3 deletions src/registrar/tests/test_admin_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def tearDownClass(self):
User.objects.all().delete()
AllowedEmail.objects.all().delete()


@less_console_noise_decorator
def test_domain_request_senior_official_is_alphabetically_sorted(self):
"""Tests if the senior offical dropdown is alphanetically sorted in the django admin display"""
Expand Down Expand Up @@ -1815,7 +1814,7 @@ def test_change_view_with_restricted_creator(self):
request,
"Cannot edit a domain request with a restricted creator.",
)

# @less_console_noise_decorator
def test_approved_domain_request_with_ready_domain_has_warning_message(self):
"""Tests if the domain request has a warning message when the approved domain is in Ready state"""
Expand All @@ -1834,7 +1833,7 @@ def test_approved_domain_request_with_ready_domain_has_warning_message(self):

with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
with patch("django.contrib.messages.warning") as mock_warning:
# Create a request object
# Create a request object
self.client.force_login(self.superuser)
self.client.get(
"/admin/registrar/domainrequest/{}/change/".format(domain_request.pk),
Expand Down

0 comments on commit 24354fd

Please sign in to comment.