mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #563: Allow a device to be flipped from one rack face to the other
This commit is contained in:
@@ -118,7 +118,11 @@ class RackUnitListView(APIView):
|
||||
|
||||
rack = get_object_or_404(Rack, pk=pk)
|
||||
face = request.GET.get('face', 0)
|
||||
elevation = rack.get_rack_units(face)
|
||||
try:
|
||||
exclude = int(request.GET.get('exclude', None))
|
||||
except ValueError:
|
||||
exclude = None
|
||||
elevation = rack.get_rack_units(face, exclude)
|
||||
|
||||
# Serialize Devices within the rack elevation
|
||||
for u in elevation:
|
||||
|
Reference in New Issue
Block a user