fix(Item Group): allow root deletion
It was not possible to delete an empty, unused Item Group without any
children, if it was one of possibly multiple roots of the Item Group tree.
This fix allows deleting a root Item Group.
(cherry picked from commit fd2c272bed)
This commit is contained in:
@@ -73,7 +73,7 @@ class ItemGroup(NestedSet, WebsiteGenerator):
|
||||
return self.route
|
||||
|
||||
def on_trash(self):
|
||||
NestedSet.on_trash(self)
|
||||
NestedSet.on_trash(self, allow_root_deletion=True)
|
||||
WebsiteGenerator.on_trash(self)
|
||||
self.delete_child_item_groups_key()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user