0

I am trying to get the descendants of a root node, but for some reason the function returns -2 on get_descendant_count().

Here's the code:

roots = Project.tree.root_nodes()
print(roots[0].get_descendants()) // returns []
print(roots[0].get_descendant_count()) // returns -2

And the root HAS a child for sure.

Anyone can advise me why this is happening? And how to get this going? Thanx

mgPePe
  • 5,677
  • 12
  • 52
  • 85

1 Answers1

0

Figured it out. The numbers were messed up, I had to run rebuild() and that fixed everything

mgPePe
  • 5,677
  • 12
  • 52
  • 85