The link is not displayed when str is blank in admin.
In the admin page, there are parts where the model's __str__
value is used, providing links that allow navigation to the object when the value is clicked.
However, when __str__
is blank, while it’s not an issue for the value to appear as blank, the <a>
tag's innerHTML
being empty prevents the layout from being displayed on the screen, and it also cannot function as a link.
While it’s very rare for a user to assign a blank value to __str__
, I still believe that it should at least function as a link.
Just like with fields, when the value is blank, a default value such as "-" should be used to ensure that it can at least function as a link.
Similar nature to #36114
It will be difficult to find all of these but we can try 👍