Skip to content

Commit 39223f7

Browse files
committed
fixed bug in condition for normalized search
1 parent 087a114 commit 39223f7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/apps/clubs/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def get_clubs(request):
3636

3737
# 2. Normalized search using translate
3838
normalized_term = re.sub(r'[^a-z0-9]', '', search_term.lower())
39-
40-
if normalized_term and normalized_term != search_term.lower():
39+
if normalized_term:
4140
# Common accented chars
4241
accents_from = "àáâãäåèéêëìíîïòóôõöùúûüýÿñç"
4342
accents_to = "aaaaaaeeeeiiiiooooouuuuyync"

backend/apps/events/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def get_events(request):
138138

139139
# 2. Normalized search using translate
140140
normalized_term = re.sub(r'[^a-z0-9]', '', term.lower())
141-
if normalized_term and normalized_term != term.lower():
141+
if normalized_term:
142142
# Func for translate:
143143
# translate(lower(field), map_from, map_to)
144144
class Translate(Func):

0 commit comments

Comments
 (0)