Closes #7504: Include IP range data under IPAM role views

This commit is contained in:
jeremystretch
2022-02-01 16:47:29 -05:00
parent 8545a547b9
commit 4f4e6938eb
4 changed files with 34 additions and 3 deletions

View File

@@ -340,6 +340,7 @@ class AggregateBulkDeleteView(generic.BulkDeleteView):
class RoleListView(generic.ObjectListView):
queryset = Role.objects.annotate(
prefix_count=count_related(Prefix, 'role'),
iprange_count=count_related(IPRange, 'role'),
vlan_count=count_related(VLAN, 'role')
)
filterset = filtersets.RoleFilterSet