Przeglądaj źródła

Fix sorting devicebay table by status

kkthxbye-code 4 lat temu
rodzic
commit
53e52aeaa8
1 zmienionych plików z 2 dodań i 1 usunięć
  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(
     status = tables.TemplateColumn(
-        template_code=DEVICEBAY_STATUS
+        template_code=DEVICEBAY_STATUS,
+        order_by=Accessor('installed_device__status')
     )
     )
     installed_device = tables.Column(
     installed_device = tables.Column(
         linkify=True
         linkify=True