Skip to content

Commit

Permalink
Fixes #18213: Enable searching for ASN ranges by name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Dec 12, 2024
1 parent abfa28d commit 2da1a75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions netbox/ipam/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ class Meta:
def search(self, queryset, name, value):
if not value.strip():
return queryset
qs_filter = Q(description__icontains=value)
return queryset.filter(qs_filter)
return queryset.filter(
Q(name__icontains=value) |
Q(description__icontains=value)
)


class ASNFilterSet(OrganizationalModelFilterSet, TenancyFilterSet):
Expand Down

0 comments on commit 2da1a75

Please sign in to comment.