소스 검색

Merge pull request #7804 from kkthxbye-code/fix-7791

Fix #7791 - Allow devicebay table to be sorted by status
Jeremy Stretch 4 년 전
부모
커밋
bd32a6ac8e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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