Skip to content

Commit be44cc5

Browse files
committed
fix: filter using case insensitive startswith
1 parent d94273e commit be44cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/genlab_bestilling/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class LocationFilter(filters.FilterSet):
110110
def filter_search(self, queryset: QuerySet, name: str, value: Any) -> QuerySet:
111111
if value:
112112
return queryset.filter(
113-
Q(name__startswith=value) | Q(river_id__startswith=value)
113+
Q(name__istartswith=value) | Q(river_id__istartswith=value)
114114
)
115115
return queryset
116116

0 commit comments

Comments
 (0)