Browse Source

Fixes #602: Correct display of custom integer fields with value of 0 or 1

Jeremy Stretch 8 years ago
parent
commit
330abe5a2d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      netbox/templates/inc/custom_fields_panel.html

+ 3 - 3
netbox/templates/inc/custom_fields_panel.html

@@ -8,13 +8,13 @@
                 <tr>
                     <td>{{ field }}</td>
                     <td>
-                        {% if value == True %}
+                        {% if field.type == 300 and value == True %}
                             <i class="glyphicon glyphicon-ok text-success" title="True"></i>
-                        {% elif value == False %}
+                        {% elif field.type == 300 and value == False %}
                             <i class="glyphicon glyphicon-remove text-danger" title="False"></i>
                         {% elif field.type == 500 and value %}
                             {{ value|urlizetrunc:75 }}
-                        {% elif value %}
+                        {% elif field.type == 200 or value %}
                             {{ value }}
                         {% elif field.required %}
                             <span class="text-warning">Not defined</span>