Issue #50 resolved

ID's and PK's

Sergey Nikitin
created an issue

I've faced a big problem, when I'm trying PK as another field, for ex. uuid, NS_Tree mixin becomes useless, because of such code:

{{{

!python

treebeard/ns_tree.py line: 385

fromobj = cls.objects.get(pk=self.id)

self.pk must be used, I don't have id field at all.

same file line 442

added = [] if parent: parent_id = parent.id else: parent_id = None

parent.id > parent.pk

parent_id > parent_pk

ALSO:

57: removed[node.id] = node 458: added.append(node_obj.id) 462: stack.extend([(node_obj.id, node) 523: parentser = lnk[parentobj.id] 527: lnk[pyobj.id] = newobj 540: return cls.objects.filter(pk=parent.id)

and etc.

}}}

Comments (1)

  1. Log in to comment