1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Use exclude() when instantiating tables to omit columns

This commit is contained in:
jeremystretch
2021-09-17 14:25:02 -04:00
parent 5e29679968
commit 9cb29f48a0
5 changed files with 15 additions and 43 deletions

View File

@@ -155,10 +155,7 @@ class RIRView(generic.ObjectView):
aggregates = Aggregate.objects.restrict(request.user, 'view').filter(
rir=instance
)
aggregates_table = tables.AggregateTable(aggregates)
aggregates_table.columns.hide('rir')
aggregates_table.columns.hide('utilization')
aggregates_table = tables.AggregateTable(aggregates, exclude=('rir', 'utilization'))
paginate_table(aggregates_table, request)
return {