mirror of
https://github.com/logos-co/open-law.git
synced 2025-02-13 07:16:25 +00:00
fix deleting nested version entities
This commit is contained in:
parent
e3db233f0c
commit
62c42b7144
@ -29,6 +29,10 @@ def delete_nested_version_entities(book_version: m.BookVersion):
|
||||
|
||||
def delete_nested_collection_entities(collection: m.Collection):
|
||||
for sub_collection in collection.children:
|
||||
collection.is_deleted = True
|
||||
collection.save(False)
|
||||
sub_collection.is_deleted = True
|
||||
sub_collection.save(False)
|
||||
delete_nested_collection_entities(sub_collection)
|
||||
for section in collection.sections:
|
||||
section: m.Section
|
||||
|
Loading…
x
Reference in New Issue
Block a user