forked from ManageIQ/manageiq
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Multiple Parents Found" issue when moving a relationship.
Originally, `.parent=` was written in terms of `add_children`. However, `add_children` supports duplicating nodes in the tree. This is reasonable because you may have a tree where multiple entries make sense, and for those things that have multiple entries, you wouldn't call `.parent`, you would probably call `.parents` and it is expected that calling `.parent` would blow up with the "Multiple Parents Found" error. However, the expectation of calling `.parent=` is that it will become the new, sole, parent, and so implementing it via add_children is wrong because it creates an oddity in that you can call `.parent=` and then not be able to call `.parent` afterwards. https://bugzilla.redhat.com/show_bug.cgi?id=1379464 https://bugzilla.redhat.com/show_bug.cgi?id=1391850 https://bugzilla.redhat.com/show_bug.cgi?id=1406431
- Loading branch information
Showing
4 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters