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

Add tenancy to cluster

fix pep8
This commit is contained in:
Fredrik Lönnegren
2019-10-07 08:29:32 +02:00
parent 9f52cdeee9
commit 3262805938
13 changed files with 80 additions and 8 deletions

View File

@ -41,7 +41,7 @@ class ClusterGroupViewSet(ModelViewSet):
class ClusterViewSet(CustomFieldModelViewSet):
queryset = Cluster.objects.prefetch_related(
'type', 'group', 'site', 'tags'
'type', 'group', 'tenant', 'site', 'tags'
).annotate(
device_count=get_subquery(Device, 'cluster'),
virtualmachine_count=get_subquery(VirtualMachine, 'cluster')