Skip to content

Commit f7d8d8b

Browse files
authored
Merge pull request #72 from cruse1977/master
Fixes #70 - ensure only unracked devices are returned to the unracked…
2 parents 84a86fd + e086668 commit f7d8d8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netbox_floorplan/views.py

Lines changed: 2 additions & 2 deletions
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)