fix 500 error

pull/124/head
Aevann 2023-02-17 16:17:05 +02:00
parent 67a29b9a51
commit 362cd288d8
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ def searchparse(text):
criteria['q'] = []
for m in search_token_regex.finditer(text):
token = m[1] if m[1] else m[2]
if not token: token = ''
# Escape SQL pattern matching special characters
token = token.replace('\\', '').replace('_', '\_').replace('%', '\%')
criteria['q'].append(token)