Explorar o código

Fix sorting devicebay table by status

kkthxbye-code %!s(int64=4) %!d(string=hai) anos
pai
achega
53e52aeaa8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      netbox/dcim/tables/devices.py

+ 2 - 1
netbox/dcim/tables/devices.py

@@ -653,7 +653,8 @@ class DeviceBayTable(DeviceComponentTable):
         }
     )
     status = tables.TemplateColumn(
-        template_code=DEVICEBAY_STATUS
+        template_code=DEVICEBAY_STATUS,
+        order_by=Accessor('installed_device__status')
     )
     installed_device = tables.Column(
         linkify=True