Sfoglia il codice sorgente

Fixed role link on IP address view

Jeremy Stretch 8 anni fa
parent
commit
4b3a425888
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      netbox/templates/ipam/ipaddress.html

+ 5 - 1
netbox/templates/ipam/ipaddress.html

@@ -83,7 +83,11 @@
                 <tr>
                 <tr>
                     <td>Role</td>
                     <td>Role</td>
                     <td>
                     <td>
-                        <a href="{% url 'ipam:ipaddress_list' %}?role={{ ipaddress.role }}">{{ ipaddress.get_role_display }}</a>
+                        {% if ipaddress.role %}
+                            <a href="{% url 'ipam:ipaddress_list' %}?role={{ ipaddress.role }}">{{ ipaddress.get_role_display }}</a>
+                        {% else %}
+                            <span class="text-muted">None</span>
+                        {% endif %}
                     </td>
                     </td>
                 </tr>
                 </tr>
                 <tr>
                 <tr>