1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #36114 -- Fixed link visibility when list_display_links field contains only whitespace.

This commit is contained in:
antoliny0919
2025-01-21 16:20:23 +09:00
committed by Sarah Boyce
parent 1b6ec1f944
commit e262d5355d
2 changed files with 13 additions and 0 deletions

View File

@@ -1076,6 +1076,17 @@ class ChangeListTests(TestCase):
"http://blues_history.com</a>" % g.pk,
)
def test_blank_str_display_links(self):
self.client.force_login(self.superuser)
gc = GrandChild.objects.create(name=" ")
response = self.client.get(
reverse("admin:admin_changelist_grandchild_changelist")
)
self.assertContains(
response,
'<a href="/admin/admin_changelist/grandchild/%s/change/">-</a>' % gc.pk,
)
def test_clear_all_filters_link(self):
self.client.force_login(self.superuser)
url = reverse("admin:auth_user_changelist")