Closes #10268: Omit trailing ".0" in device positions within UI

This commit is contained in:
jeremystretch
2022-09-07 14:09:17 -04:00
parent 1cbb2320c1
commit b702822857
4 changed files with 13 additions and 6 deletions

View File

@@ -70,7 +70,7 @@
{% endif %}
{% endwith %}
{% elif object.rack and object.position %}
<span>U{{ object.position }} / {{ object.get_face_display }}</span>
<span>U{{ object.position|floatformat }} / {{ object.get_face_display }}</span>
{% elif object.rack and object.device_type.u_height %}
<span class="badge bg-warning">Not racked</span>
{% else %}

View File

@@ -55,7 +55,7 @@
<td>{{ device.pk }}</td>
<td>
{% if device.rack %}
{{ device.rack }} / {{ device.position }}
{{ device.rack }} / {{ device.position|floatformat }}
{% else %}
{{ ''|placeholder }}
{% endif %}