This commit is contained in:
Nabin Hait 2014-05-28 16:11:03 +05:30
parent 08b27f7d20
commit f15863babc

View file

@ -23,7 +23,7 @@ def rename_doc(doctype, old, new, force=False, merge=False, ignore_permissions=F
# call before_rename
out = frappe.get_doc(doctype, old).run_method("before_rename", old, new, merge) or {}
new = (out.get("new") or new) if isinstance(out, dict) else new
new = (out.get("new") or new) if isinstance(out, dict) else (out or new)
new = validate_rename(doctype, new, meta, merge, force, ignore_permissions)
if not merge: