Link to related object if changed object has no URL

This commit is contained in:
Jeremy Stretch 2018-07-16 13:29:57 -04:00
parent d334bd4477
commit 57487f38de

View File

@ -41,6 +41,8 @@ OBJECTCHANGE_ACTION = """
OBJECTCHANGE_OBJECT = """
{% if record.action != 3 and record.changed_object.get_absolute_url %}
<a href="{{ record.changed_object.get_absolute_url }}">{{ record.object_repr }}</a>
{% elif record.action != 3 and record.related_object.get_absolute_url %}
<a href="{{ record.related_object.get_absolute_url }}">{{ record.object_repr }}</a>
{% else %}
{{ record.object_repr }}
{% endif %}