Skip to content

Commit e086668

Browse files
committed
Fixes #70 - ensure only unracked devices are returned to the unracked tab
1 parent 4285390 commit e086668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netbox_floorplan/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ def get(self, request):
130130
fp_instance = models.Floorplan.objects.get(pk=fp_id)
131131
if fp_instance.record_type == "site":
132132
self.queryset = Device.objects.all().filter(~Q(id__in=fp_instance.mapped_devices)).filter(
133-
site=fp_instance.site.id).order_by("name")
133+
site=fp_instance.site.id, rack=None).order_by("name")
134134
else:
135135
self.queryset = Device.objects.all().filter(~Q(id__in=fp_instance.mapped_devices)).filter(
136-
location=fp_instance.location.id).order_by("name")
136+
location=fp_instance.location.id, rack=None).order_by("name")
137137
return super().get(request)
138138

139139

0 commit comments

Comments
 (0)