瀏覽代碼

Merge pull request #16344 from frappe/mergify/bp/develop/pr-16239

version-14
Suraj Shetty 3 年之前
committed by GitHub
父節點
當前提交
a1664330a7
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 4 行新增1 行删除
  1. +3
    -0
      frappe/database/database.py
  2. +1
    -1
      frappe/permissions.py

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

@@ -119,6 +119,9 @@ class Database(object):
if not run:
return query

# remove \n \t from start and end of query
query = re.sub(r'^\s*|\s*$', '', query)

if re.search(r'ifnull\(', query, flags=re.IGNORECASE):
# replaces ifnull in query with coalesce
query = re.sub(r'ifnull\(', 'coalesce(', query, flags=re.IGNORECASE)


+ 1
- 1
frappe/permissions.py 查看文件

@@ -594,4 +594,4 @@ def is_parent_valid(child_doctype, parent_doctype):
from frappe.core.utils import find
parent_meta = frappe.get_meta(parent_doctype)
child_table_field_exists = find(parent_meta.get_table_fields(), lambda d: d.options == child_doctype)
return not parent_meta.istable and child_table_field_exists
return not parent_meta.istable and child_table_field_exists

Loading…
取消
儲存