Parcourir la source

Fixed role link on IP address view

Jeremy Stretch il y a 7 ans
Parent
commit
4b3a425888
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      netbox/templates/ipam/ipaddress.html

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

@@ -83,7 +83,11 @@
                 <tr>
                     <td>Role</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>
                 </tr>
                 <tr>