From c2d6b459c52b70bcba215780f6ca1ff5b4f5e5ba Mon Sep 17 00:00:00 2001 From: Seb Harrington Date: Tue, 6 Aug 2024 09:52:11 +0100 Subject: [PATCH] Just use all devices --- netbox_device_map/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox_device_map/views.py b/netbox_device_map/views.py index cfb807a..b3fe485 100644 --- a/netbox_device_map/views.py +++ b/netbox_device_map/views.py @@ -25,11 +25,11 @@ class MapView(PermissionRequiredMixin, View): """Device map view""" form = self.form(request.GET) if form.is_valid(): - interfaces = Interface.objects.all() + #interfaces = Interface.objects.all() #vlan = form.cleaned_data['vlan'] #interfaces = interfaces.filter(Q(untagged_vlan=vlan) | Q(tagged_vlans=vlan)) - devices = Device.objects.filter(interfaces__in=interfaces).distinct() + devices = Device.objects.all().distinct() if device_roles := form.cleaned_data['device_roles']: devices = devices.filter(role__in=device_roles) print(f"Device roles are :{device_roles}")