Răsfoiți Sursa

Use order_by to change ordering behavior of VLAN column rather than changing accessor

Brian Tiemann 1 an în urmă
părinte
comite
f6b8c1966d
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      netbox/ipam/tables/ip.py

+ 2 - 2
netbox/ipam/tables/ip.py

@@ -200,9 +200,9 @@ class PrefixTable(TenancyColumnsMixin, NetBoxTable):
         verbose_name=_('VLAN Group')
     )
     vlan = tables.Column(
-        accessor='vlan__vid',
+        order_by=('vlan__vid', 'vlan__pk'),
         linkify=True,
-        verbose_name=_('VLAN ID')
+        verbose_name=_('VLAN')
     )
     role = tables.Column(
         verbose_name=_('Role'),