Skip to content

Commit a53b80d

Browse files
authored
Merge pull request #1036 from mapswipe/hotfix/user-group-search
Hotfix feat(django): add support for unaccent search for usergroups
2 parents f3d48c8 + 46950aa commit a53b80d

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

django/apps/existing_database/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class UserGroupFilter:
3838
def filter_search(self, queryset):
3939
if self.search:
4040
queryset = queryset.filter(
41-
name__icontains=self.search,
41+
name__unaccent__icontains=self.search,
4242
)
4343
return queryset
4444

mapswipe_workers/tests/integration/set_up_db.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-- noinspection SqlNoDataSourceInspectionForFile
22
CREATE EXTENSION IF NOT EXISTS postgis;
3+
CREATE EXTENSION IF NOT EXISTS unaccent;
34

45
CREATE TABLE IF NOT EXISTS projects (
56
created timestamp,

postgres/initdb.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-- noinspection SqlNoDataSourceInspectionForFile
22
CREATE EXTENSION IF NOT EXISTS postgis;
3+
CREATE EXTENSION IF NOT EXISTS unaccent;
34

45
CREATE TABLE IF NOT EXISTS projects (
56
created timestamp,

0 commit comments

Comments
 (0)