refactor: getattr
Co-authored-by: gavin <gavin18d@gmail.com>
This commit is contained in:
parent
cb21e9de84
commit
aa06b63eb6
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ def import_doc(docdict, force=False, data_import=False, pre_process=None,
|
|||
|
||||
doc = frappe.get_doc(docdict)
|
||||
|
||||
if hasattr(doc.meta, 'is_tree') and getattr(doc.meta, 'is_tree'):
|
||||
if getattr(doc.meta, 'is_tree', None):
|
||||
doc.lft = None
|
||||
doc.rgt = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue