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.
This commit is contained in:
parent
2c1943c7e6
commit
fd2c272bed
@ -76,7 +76,7 @@ class ItemGroup(NestedSet, WebsiteGenerator):
|
|||||||
return self.route
|
return self.route
|
||||||
|
|
||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
NestedSet.on_trash(self)
|
NestedSet.on_trash(self, allow_root_deletion=True)
|
||||||
WebsiteGenerator.on_trash(self)
|
WebsiteGenerator.on_trash(self)
|
||||||
self.delete_child_item_groups_key()
|
self.delete_child_item_groups_key()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user