Closed mheppner closed 3 years ago
@mheppner - thanks, great catch. Will update this shortly and add testing for that case as well.
I have a bit of spare time, so expect to see several additional improvements over the next couple weeks (github actions, more thorough testing, updated docs). If you spot any other issues or have feature requests that might make this package better for everyone, please let me know.
much thanks! 💯
Resolved in 0.1.9 with additional tests to check for deletion of parent of child when they share multiple edges.
I renamed this issue, and added #4 which I'll work on this week to add a non-breaking option to prevent any node from having multiple shared edges with a parent/child node.
Great library, this is working pretty well for us!
One issue I'm facing is that you can add multiple duplicate edges, resulting in some instability in the API.
This results in 3 edges being created, all with the same parent and child pointers. This may be desired - it's still a valid graph. The issue comes when you try to delete the parent:
An exception is raised:
Should
remove_parent()
be changed fromparent.children.through.objects.get(parent=parent, child=self).delete()
to a.filter()
?