From d294e916a450fcd2bd0f69c99e1c803c221fa6ef Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 2 Aug 2016 10:50:25 -0400 Subject: [PATCH] Fixes #406: Corrected ordering of port_speed and commit_rate in CircuitTable --- netbox/circuits/tables.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/netbox/circuits/tables.py b/netbox/circuits/tables.py index 66cbd33ca..f82459890 100644 --- a/netbox/circuits/tables.py +++ b/netbox/circuits/tables.py @@ -57,9 +57,11 @@ class CircuitTable(BaseTable): provider = tables.LinkColumn('circuits:provider', args=[Accessor('provider.slug')], verbose_name='Provider') tenant = tables.LinkColumn('tenancy:tenant', args=[Accessor('tenant.slug')], verbose_name='Tenant') site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')], verbose_name='Site') - port_speed_human = tables.Column(verbose_name='Port Speed') - commit_rate_human = tables.Column(verbose_name='Commit Rate') + port_speed = tables.Column(accessor=Accessor('port_speed_human'), order_by=Accessor('port_speed'), + verbose_name='Port Speed') + commit_rate = tables.Column(accessor=Accessor('commit_rate_human'), order_by=Accessor('commit_rate'), + verbose_name='Commit Rate') class Meta(BaseTable.Meta): model = Circuit - fields = ('pk', 'cid', 'type', 'provider', 'tenant', 'site', 'port_speed_human', 'commit_rate_human') + fields = ('pk', 'cid', 'type', 'provider', 'tenant', 'site', 'port_speed', 'commit_rate')