浏览代码

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

正在加载...
取消
保存