mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove extraneous queryset filter
This commit is contained in:
@ -78,9 +78,7 @@ class VirtualMachineViewSet(CustomFieldModelViewSet):
|
|||||||
|
|
||||||
|
|
||||||
class VMInterfaceViewSet(ModelViewSet):
|
class VMInterfaceViewSet(ModelViewSet):
|
||||||
queryset = VMInterface.objects.filter(
|
queryset = VMInterface.objects.prefetch_related(
|
||||||
virtual_machine__isnull=False
|
|
||||||
).prefetch_related(
|
|
||||||
Prefetch('tagged_vlans', queryset=VLAN.objects.unrestricted()),
|
Prefetch('tagged_vlans', queryset=VLAN.objects.unrestricted()),
|
||||||
'virtual_machine', 'tags'
|
'virtual_machine', 'tags'
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user