Skip to content

Commit

Permalink
Fixes #16450: Rack unit filter should be case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Jun 17, 2024
1 parent 6abad9c commit 9559349
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netbox/dcim/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ def elevation(self, request, pk=None):
)

# 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'])]
if q := data['q']:
q = q.lower()
elevation = [u for u in elevation if q in str(u['id']) or q in str(u['name']).lower()]

page = self.paginate_queryset(elevation)
if page is not None:
Expand Down

0 comments on commit 9559349

Please sign in to comment.