Merge branch 'develop' into develop-2.8

This commit is contained in:
Jeremy Stretch
2020-03-03 13:20:00 -05:00
77 changed files with 1331 additions and 565 deletions

View File

@@ -210,6 +210,11 @@ class RackViewSet(CustomFieldModelViewSet):
expand_devices=data['expand_devices']
)
# Enable filtering rack units by ID
q = data['q']
if q:
elevation = [u for u in elevation if q in str(u['id']) or q in str(u['name'])]
page = self.paginate_queryset(elevation)
if page is not None:
rack_units = serializers.RackUnitSerializer(page, many=True, context={'request': request})