Deleting regions not possible if media library has nested structure #1749
Labels
🍼 good first issue
Good for newcomers
‼️ prio: high
Needs to be resolved ASAP.
🐛 bug
Something isn't working
☺️ effort: low
Should be doable in <4h
Milestone
Describe the Bug
Normally, media files and directories are cascade deleted when regions are deleted.
However, this fails if the protection rules between media files and directories prevent the cascade deletion.
Steps to Reproduce
Expected Behavior
The region should be deleted and all media elements and directories with it.
This can either be achieved by deleting them in the correct order (by deleting the sub-folders and elements first) or removing the protected relationship by setting
parent = None
on all directories andparent_directory = None
on all media files before deleting.Actual Behavior
A
ProtectedError
occursAdditional Information
Traceback
The text was updated successfully, but these errors were encountered: