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

Miscellaneous RestrictedQuerySet cleanup

This commit is contained in:
Jeremy Stretch
2020-07-09 15:11:18 -04:00
parent 26e81546eb
commit 4f00b5af4a
8 changed files with 21 additions and 14 deletions

View File

@ -495,13 +495,13 @@ class DeviceRoleTable(BaseTable):
pk = ToggleColumn()
device_count = tables.TemplateColumn(
template_code=DEVICEROLE_DEVICE_COUNT,
accessor=Accessor('devices.count'),
accessor=Accessor('devices.unrestricted.count'),
orderable=False,
verbose_name='Devices'
)
vm_count = tables.TemplateColumn(
template_code=DEVICEROLE_VM_COUNT,
accessor=Accessor('virtual_machines.count'),
accessor=Accessor('virtual_machines.unrestricted.count'),
orderable=False,
verbose_name='VMs'
)