[fix] for new doctype
This commit is contained in:
parent
9e7b174c76
commit
281d8a6481
1 changed files with 6 additions and 2 deletions
|
|
@ -71,8 +71,12 @@ class DocType(Document):
|
|||
|
||||
def update_fields_to_fetch(self):
|
||||
'''Update values for newly set fetch values'''
|
||||
old_meta = frappe.get_meta(frappe.get_doc('DocType', self.name), cached=False)
|
||||
old_fields_to_fetch = [df.fieldname for df in old_meta.get_fields_to_fetch()]
|
||||
try:
|
||||
old_meta = frappe.get_meta(frappe.get_doc('DocType', self.name), cached=False)
|
||||
old_fields_to_fetch = [df.fieldname for df in old_meta.get_fields_to_fetch()]
|
||||
except frappe.DoesNotExistError:
|
||||
old_fields_to_fetch = []
|
||||
|
||||
new_meta = frappe.get_meta(self, cached=False)
|
||||
|
||||
if set(old_fields_to_fetch) != set([df.fieldname for df in new_meta.get_fields_to_fetch()]):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue