fix: only remove \n\t from start and end
(cherry picked from commit 7bb172365f2c9ae6cca98ccc4dfee7714b9c3f0c) # Conflicts: # frappe/database/database.py
This commit is contained in:
parent
b2c0bf7a4e
commit
fbac6fbfb4
1 changed files with 5 additions and 0 deletions
|
|
@ -121,9 +121,14 @@ class Database(object):
|
|||
return query
|
||||
=======
|
||||
|
||||
<<<<<<< HEAD
|
||||
# remove \n \t from start of query and replace them with space anywhere in middle
|
||||
query = re.sub(r'\s', ' ', query).lstrip()
|
||||
>>>>>>> ac5effc7dd (fix: remove tab \t and newlines \n from start of query and remove from middle)
|
||||
=======
|
||||
# remove \n \t from start and end of query
|
||||
query = re.sub(r'^\s*|\s*$', '', query)
|
||||
>>>>>>> 7bb172365f (fix: only remove \n\t from start and end)
|
||||
|
||||
if re.search(r'ifnull\(', query, flags=re.IGNORECASE):
|
||||
# replaces ifnull in query with coalesce
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue