Merge pull request #8333 from frappe/sahil28297-patch-1

fix(nestedset): check if meta has nsm_parent_field
This commit is contained in:
sahil28297 2019-09-03 22:39:10 +05:30 committed by GitHub
commit 2f233d849a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,7 +184,7 @@ def validate_loop(doctype, name, lft, rgt):
class NestedSet(Document):
def __setup__(self):
if self.meta.nsm_parent_field:
if self.meta.get("nsm_parent_field"):
self.nsm_parent_field = self.meta.nsm_parent_field
def on_update(self):