1. Lukasz Balcerzak
  2. django-treebeard

Commits

Gustavo Picon  committed bf33428

sib_order must be removed in AL_Node.dump_bulk only if it exists

  • Participants
  • Parent commits 4097b45
  • Branches default

Comments (0)

Files changed (1)

File treebeard/al_tree.py

View file
             # django's serializer stores the attributes in 'fields'
             fields = pyobj['fields']
             del fields['parent']
-            del fields['sib_order']
+
+            # non-sorted trees have this
+            if 'sib_order' in fields:
+                del fields['sib_order']
+
             if 'id' in fields:
                 del fields['id']