Switched URL to use asset_id rather than the database ID

This commit is contained in:
Matthew Smith
2019-12-04 20:13:09 +00:00
parent c4cad76653
commit 15acc02f74
8 changed files with 33 additions and 21 deletions

View File

@@ -15,7 +15,7 @@
<dt>Parent</dt>
<dd>
{% if object.parent %}
<a href="{% url 'asset_detail' object.parent.pk %}">
<a href="{% url 'asset_detail' object.parent.asset_id %}">
{{ object.parent.asset_id }} - {{ object.parent.description }}
</a>
{% else %}
@@ -27,7 +27,7 @@
{% if object.asset_parent.all %}
{% for child in object.asset_parent.all %}
<dd>
<a href="{% url 'asset_detail' child.pk %}">
<a href="{% url 'asset_detail' child.asset_id %}">
{{ child.asset_id }} - {{ child.description }}
</a>
</dd>