integreat-cms
integreat-cms copied to clipboard
Specify protected pages when trying to delete regions
Motivation
If someone tries to delete a region that has pages that are mirrored somewhere else Django throws a ProtectedError
and our server returns a internal server error. As the user has no information about the reason and the conflicting pages we should return an error message that contains the reason and the affected pages.
Additional Context
For reproduction purpose you can mirror a page from a region that you try to delete afterwards. You will then get a 501 and see the stack trace in the console.