Browse Source

Fixed role link on IP address view

Jeremy Stretch 7 years ago
parent
commit
4b3a425888
1 changed files with 5 additions and 1 deletions
  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>