Browse Source

fix in nested set

version-14
Rushabh Mehta 11 years ago
parent
commit
fa3e6e4f61
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      webnotes/utils/nestedset.py

+ 1
- 1
webnotes/utils/nestedset.py View File

@@ -34,7 +34,7 @@ def update_nsm(doc_obj):
if hasattr(doc_obj,'nsm_oldparent_field'): if hasattr(doc_obj,'nsm_oldparent_field'):
opf = doc_obj.nsm_oldparent_field opf = doc_obj.nsm_oldparent_field


p, op = d.fields.get(pf, ''), d.fields.get(opf, '')
p, op = d.fields.get(pf) or None, d.fields.get(opf) or None
# has parent changed (?) or parent is None (root) # has parent changed (?) or parent is None (root)
if not d.lft and not d.rgt: if not d.lft and not d.rgt:


Loading…
Cancel
Save