Integrity Error on Ponos task parents when deleting a corpus
https://teklia.sentry.io/issues/4101754125/events/1595cfef18164688824c8b2ff4f78694/
This is an old issue, I ran into it trying to delete https://demo.arkindex.org/browse/15b33cce-9511-4d33-8c63-97111793288f?top_level=true&folder=true and/or https://demo.arkindex.org/browse/5c035250-8d1c-4852-86a7-cf3016600411?top_level=true&folder=true (the corpus deletion failed but only after deleting memberships so I was kicked out of the projects which made it hard to keep track.)
Possibly this could be solved by ordering the Task queryset by depth
so that the deepest tasks are deleted first so that a parent task is never deleted before its child task.