소스 검색

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"): if doc.get("parent") and doc.get("parenttype"):
# inserting a child record # 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() parent.save()
return parent.as_dict() return parent.as_dict()
else: else:


불러오는 중...
취소
저장