Issue 66: gt_ancestrors() returns an empty list
Status:  Duplicate
Merged:  issue 78
Owner: ----
Closed:  Nov 2010
Reported by arka...@gmail.com, Dec 23, 2009
What steps will reproduce the problem?
1. Create a simple model, mine only have a custom parent field called 
"categoria", doesn't seem to be the source of the problem
2. Add mptt.register to models (try/catch) stuff to prevent 
AlreadyRegistered exception
3. Create some registers with the shell that form a hierarchy, then call 
<ModelName>.get_anchestors()

What is the expected output? What do you see instead?
I expected to get the list of ancestors, but got an empty list instead

What version of the product are you using? On what operating system?
SVN trunk, revision 121

Please provide any additional information below.

Jan 27, 2010
#1 daru...@gmail.com
I'm running into similar issues. Details here:

http://stackoverflow.com/questions/2152880/django-mptt-completely-buggy-or-am-i-doing-
it-wrong

I'm also using r121 .
Sep 2, 2010
Project Member #2 craig.ds@gmail.com
When you change a node, django-mptt updates the tree fields on some of the other nodes in the same tree.

This means if you have references to those nodes, the tree fields on them will be wrong.

Refreshing them from the database solves it:

    nodes[0] = Node.objects.get(pk=nodes[0].pk)

Open to suggestions as to how to fix this disparity...
Status: Chatting
Sep 8, 2010
Project Member #3 craig.ds@gmail.com
It looks like if http://code.djangoproject.com/ticket/17 lands in django, this issue may be solved.

If this is a blocker for you, consider applying the patch at that link to your django build.

No guarantees, I haven't tested it. If it works for you, please comment to let us know.
Nov 12, 2010
Project Member #4 craig.ds@gmail.com
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 78