Explorar o código

Fixes #21651: Disable ordering on MACAddress is_primary column

is_primary is a cached_property, not a database field, so attempting
to order by it raises a FieldError.
Jason Novinger hai 1 día
pai
achega
10157394ae
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

@@ -1205,7 +1205,8 @@ class MACAddressTable(PrimaryModelTable):
         verbose_name=_('Parent')
     )
     is_primary = columns.BooleanColumn(
-        verbose_name=_('Primary')
+        verbose_name=_('Primary'),
+        orderable=False,
     )
     tags = columns.TagColumn(
         url_name='dcim:macaddress_list'