State:Closed|icon_bug|database:public|icon_mari|Resolution:Fixed|TargetRelease:5.0v3|BugID:497093|
Problem summary
Shelf Groups are not cleaned up if child Shelves are ungrouped via Python or deleted
This issue can occur if:
- Grouped Shelves are Ungrouped via Python
- Grouped Shelves are deleted via Python
- Grouped Shelves are deleted via the UI
The empty Groups are not returned after runningmari.shelves.list()
Customer reported version
Mari 4.7v5
Customer reported platform
CentOS 7.9
Steps to reproduce
Empty Groups after ungrouping via Python:
myshelf = mari.shelves.createShelf('myshelf')
mari.shelves.groupShelf(myshelf, '//parent1/parent2')
mari.shelves.ungroupShelf(myshelf) # move it under parent1
mari.shelves.ungroupShelf(myshelf) # move it to the top
for s in mari.shelves.list():
print(s.path()) # this does not list parent1 or parent2
myshelf = mari.shelves.createShelf('myshelf')
mari.shelves.groupShelf(myshelf, '//parent1/parent2')
mari.shelves.removeShelf(myshelf)
for s in mari.shelves.list():
print(s.path()) # this does not list parent1 or parent2
mari.shelves.list() does not return the empty hierarchy.We're sorry to hear that
Please tell us why