Update src/registrar/admin.py

Co-authored-by: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
This commit is contained in:
Matt-Spence 2024-12-23 14:57:37 -06:00 committed by GitHub
parent 24354fd7f1
commit f277efc6c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2442,10 +2442,12 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
obj_id = domain.id obj_id = domain.id
change_url = reverse("admin:%s_%s_change" % (app_label, model_name), args=[obj_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 = format_html(
message += f"<a href='{change_url}'>{domain}</a></li>" "<li>The status of this domain request cannot be changed because it has been joined to a domain in Ready status:"
"<a href='{}'>{}</a></li>",
message_html = mark_safe(message) # nosec mark_safe(change_url),
escape(str(domain))
)
messages.warning( messages.warning(
request, request,
message_html, message_html,