Просмотр исходного кода

Fixes #3421: Fix exception when ordering power connections list by PDU

Jeremy Stretch 6 лет назад
Родитель
Сommit
2d2bb3ec0c
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 0
      netbox/dcim/tables.py

+ 1 - 0
CHANGELOG.md

@@ -3,6 +3,7 @@ v2.6.3 (FUTURE)
 ## Bug Fixes
 ## Bug Fixes
 
 
 * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive
 * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive
+* [#3421](https://github.com/netbox-community/netbox/issues/3421) - Fix exception when ordering power connections list by PDU
 * [#3424](https://github.com/netbox-community/netbox/issues/3424) - Fix tag coloring for non-linked tags
 * [#3424](https://github.com/netbox-community/netbox/issues/3424) - Fix tag coloring for non-linked tags
 * [#3426](https://github.com/netbox-community/netbox/issues/3426) - Improve API error handling for ChoiceFields
 * [#3426](https://github.com/netbox-community/netbox/issues/3426) - Improve API error handling for ChoiceFields
 
 

+ 1 - 0
netbox/dcim/tables.py

@@ -729,6 +729,7 @@ class PowerConnectionTable(BaseTable):
         viewname='dcim:device',
         viewname='dcim:device',
         accessor=Accessor('connected_endpoint.device'),
         accessor=Accessor('connected_endpoint.device'),
         args=[Accessor('connected_endpoint.device.pk')],
         args=[Accessor('connected_endpoint.device.pk')],
+        order_by='_connected_poweroutlet__device',
         verbose_name='PDU'
         verbose_name='PDU'
     )
     )
     outlet = tables.Column(
     outlet = tables.Column(