Update src/registrar/admin.py

Co-authored-by: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
This commit is contained in:
CuriousX 2024-12-20 16:45:15 -07:00 committed by GitHub
parent 3e0a5a87e0
commit 2c4f7d06b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1993,7 +1993,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"{obj.id}" url = reverse("admin:registrar_domainrequest_changelist", args=[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)