From 53e52aeaa80a5f9a5584be42e7586678583a5a9d Mon Sep 17 00:00:00 2001 From: kkthxbye-code Date: Thu, 11 Nov 2021 14:05:39 +0100 Subject: [PATCH] Fix sorting devicebay table by status --- netbox/dcim/tables/devices.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 675f7d777..c8559458c 100644 --- a/netbox/dcim/tables/devices.py +++ b/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