瀏覽代碼

[fix] rename_doc

version-14
Rushabh Mehta 9 年之前
父節點
當前提交
99f1682721
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      frappe/model/rename_doc.py

+ 1
- 1
frappe/model/rename_doc.py 查看文件

@@ -89,7 +89,7 @@ def rename_parent_and_child(doctype, old, new, meta):

def validate_rename(doctype, new, meta, merge, force, ignore_permissions):
# using for update so that it gets locked and someone else cannot edit it while this rename is going on!
exists = frappe.db.sql("select name from `tab{doctype}` where name=%s COLLATE utf8mb4_bin for update".format(doctype=frappe.db.escape(doctype)), new)
exists = frappe.db.sql("select name from `tab{doctype}` where name=%s COLLATE utf8mb4_unicode_ci for update".format(doctype=frappe.db.escape(doctype)), new)
exists = exists[0][0] if exists else None

if merge and not exists:


Loading…
取消
儲存