Browse Source

Fixes: #10465 Format all remaining displayed rackunits with floatformat (#10481)

* Fixes: #10465 Try to finish #10268 and format all remaining displayed rackunits with floatformat

* #10465: PEP8 fix

Co-authored-by: Patrick Hurrelmann <patrick.hurrelmann@nfon.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
Patrick Hurrelmann 3 years ago
parent
commit
5cc55d1e99
1 changed files with 3 additions and 0 deletions
  1. 3 0
      netbox/dcim/tables/devicetypes.py

+ 3 - 0
netbox/dcim/tables/devicetypes.py

@@ -92,6 +92,9 @@ class DeviceTypeTable(NetBoxTable):
         template_code=DEVICE_WEIGHT,
         order_by=('_abs_weight', 'weight_unit')
     )
+    u_height = columns.TemplateColumn(
+        template_code='{{ value|floatformat }}'
+    )
 
     class Meta(NetBoxTable.Meta):
         model = DeviceType