1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #7474: Fix AttributeError exception when rendering a report or custom script

This commit is contained in:
jeremystretch
2021-10-07 09:37:21 -04:00
parent 2bd29127dc
commit 3f766ffea8
4 changed files with 23 additions and 5 deletions

View File

@@ -9,15 +9,17 @@
{# Breadcrumbs #}
<nav class="breadcrumb-container px-3" aria-label="breadcrumb">
<div class="float-end">
<code class="text-muted" title="Object type and ID">
{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}
{% if object.slug %}({{ object.slug }}){% endif %}
</code>
<code class="text-muted">
{% block object_identifier %}
{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}
{% if object.slug %}({{ object.slug }}){% endif %}
{% endblock object_identifier %}
</code>
</div>
<ol class="breadcrumb">
{% block breadcrumbs %}
<li class="breadcrumb-item"><a href="{% url object|viewname:'list' %}">{{ object|meta:'verbose_name_plural'|bettertitle }}</a></li>
{% endblock %}
{% endblock breadcrumbs %}
</ol>
</nav>
{{ block.super }}