There appears to be an issue when adding a parent ID to an existing node that doesn’t already have a parent ID, in the same tree. The use case is like so:
node_1 # a node that has no parent, but valid left and right values. so it is a root and a leaf
parent_node # another node that we will be making into the parent node for node_1
node_1.parent_id = parent_node.id
session.add(node_1)
session.commit()
The tree_id is the same for both nodes. Once this is done, node_1 does not get updated with the new parent ID. The parent ID still remains null, and the left and right values are the same.
This issue happens only in nodes where they don’t have an existing parent_id. So, whenever we try to update such nodes by giving them a parent_id, the update fails and the nodes remain the same.
There appears to be an issue when adding a parent ID to an existing node that doesn’t already have a parent ID, in the same tree. The use case is like so:
The tree_id is the same for both nodes. Once this is done, node_1 does not get updated with the new parent ID. The parent ID still remains null, and the left and right values are the same.
This issue happens only in nodes where they don’t have an existing parent_id. So, whenever we try to update such nodes by giving them a parent_id, the update fails and the nodes remain the same.