fix: 'Meta' object has no attribute 'is_tree'

This commit is contained in:
barredterra 2021-05-10 12:39:00 +02:00
parent 4a5f8dd23d
commit cb21e9de84

View file

@ -107,7 +107,7 @@ def import_doc(docdict, force=False, data_import=False, pre_process=None,
doc = frappe.get_doc(docdict)
if doc.meta.is_tree:
if hasattr(doc.meta, 'is_tree') and getattr(doc.meta, 'is_tree'):
doc.lft = None
doc.rgt = None