浏览代码

Merge pull request #1756 from MaxMorais/patch-20

Fix: AttributeError: 'dict' object has no attribute 'parenttype'
version-14
Rushabh Mehta 9 年前
父节点
当前提交
03742c1d36
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      frappe/client.py

+ 2
- 2
frappe/client.py 查看文件

@@ -75,8 +75,8 @@ def insert(doc=None):

if doc.get("parent") and doc.get("parenttype"):
# inserting a child record
parent = frappe.get_doc(doc.parenttype, doc.parent)
parent.append(doc)
parent = frappe.get_doc(doc.get("parenttype"), doc.get("parent"))
parent.append(doc.get("parentfield"), doc)
parent.save()
return parent.as_dict()
else:


正在加载...
取消
保存