mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Link to related object if changed object has no URL
This commit is contained in:
parent
d334bd4477
commit
57487f38de
@ -41,6 +41,8 @@ OBJECTCHANGE_ACTION = """
|
|||||||
OBJECTCHANGE_OBJECT = """
|
OBJECTCHANGE_OBJECT = """
|
||||||
{% if record.action != 3 and record.changed_object.get_absolute_url %}
|
{% if record.action != 3 and record.changed_object.get_absolute_url %}
|
||||||
<a href="{{ record.changed_object.get_absolute_url }}">{{ record.object_repr }}</a>
|
<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 %}
|
{% else %}
|
||||||
{{ record.object_repr }}
|
{{ record.object_repr }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user