mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Fixes #16450: Rack unit filter should be case-insensitive
This commit is contained in:
parent
6abad9c20c
commit
9559349541
@ -219,9 +219,9 @@ class RackViewSet(NetBoxModelViewSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Enable filtering rack units by ID
|
# Enable filtering rack units by ID
|
||||||
q = data['q']
|
if q := data['q']:
|
||||||
if q:
|
q = q.lower()
|
||||||
elevation = [u for u in elevation if q in str(u['id']) or q in str(u['name'])]
|
elevation = [u for u in elevation if q in str(u['id']) or q in str(u['name']).lower()]
|
||||||
|
|
||||||
page = self.paginate_queryset(elevation)
|
page = self.paginate_queryset(elevation)
|
||||||
if page is not None:
|
if page is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user