Merge pull request #3265 from cisagov/nl/3264-fix-domain-request-hyperlink

[DRAFT - pending ticket review] #3264 - Fix domain request admin table hyperlink - [NL]
This commit is contained in:
CuriousX 2024-12-26 12:10:24 -07:00 committed by GitHub
commit ccd483328d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1995,7 +1995,7 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
@admin.display(description=_("Requested Domain")) @admin.display(description=_("Requested Domain"))
def custom_requested_domain(self, obj): def custom_requested_domain(self, obj):
# Example: Show different icons based on `status` # Example: Show different icons based on `status`
url = reverse("admin:registrar_domainrequest_changelist") + f"?portfolio={obj.id}" url = reverse("admin:registrar_domainrequest_changelist") + f"{obj.id}"
text = obj.requested_domain text = obj.requested_domain
if obj.portfolio: if obj.portfolio:
return format_html('<a href="{}"><img src="/public/admin/img/icon-yes.svg"> {}</a>', url, text) return format_html('<a href="{}"><img src="/public/admin/img/icon-yes.svg"> {}</a>', url, text)