瀏覽代碼

fix: only remove \n\t from start and end

(cherry picked from commit 7bb172365f)

# Conflicts:
#	frappe/database/database.py
version-14
Shariq Ansari 3 年之前
committed by mergify-bot
父節點
當前提交
fbac6fbfb4
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      frappe/database/database.py

+ 5
- 0
frappe/database/database.py 查看文件

@@ -121,9 +121,14 @@ class Database(object):
return query return query
======= =======


<<<<<<< HEAD
# remove \n \t from start of query and replace them with space anywhere in middle # remove \n \t from start of query and replace them with space anywhere in middle
query = re.sub(r'\s', ' ', query).lstrip() query = re.sub(r'\s', ' ', query).lstrip()
>>>>>>> ac5effc7dd (fix: remove tab \t and newlines \n from start of query and remove from middle) >>>>>>> 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): if re.search(r'ifnull\(', query, flags=re.IGNORECASE):
# replaces ifnull in query with coalesce # replaces ifnull in query with coalesce


Loading…
取消
儲存