Fix some deprecations and factor out a helper function (#387)

This commit is contained in:
FatherInire 2022-10-28 14:15:48 +11:00 committed by GitHub
parent 4bdfe28a35
commit b46ada9f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 44 deletions

4
files/helpers/strings.py Normal file
View file

@ -0,0 +1,4 @@
# clean strings for searching
def sql_ilike_clean(my_str):
return my_str.replace(r'\\', '').replace('_', r'\_').replace('%', '').strip()