Fix "object has no attribute 'parent_doc'" error while saving doc (#6855)
This commit is contained in:
parent
0704928fd8
commit
f5ded9fd56
1 changed files with 1 additions and 1 deletions
|
|
@ -754,7 +754,7 @@ class BaseDocument(object):
|
|||
ref_doc = frappe.new_doc(self.doctype)
|
||||
else:
|
||||
# get values from old doc
|
||||
if self.parent:
|
||||
if self.get('parent_doc'):
|
||||
self.parent_doc.get_latest()
|
||||
ref_doc = [d for d in self.parent_doc.get(self.parentfield) if d.name == self.name][0]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue