Open stefanw opened 1 year ago
@stefanw has there been any further movement on this?
@Will-Hoey The code is slightly specific to your site's requirements. It works for us and if it works for more people it might be worth adding as an option.
@stefanw thanks for the reply! I ended up forking your branch and extending it slightly to fit my case
Models (e.g. CMS plugins) that use
cms.models.fields.PageField
or other references tocms.Page
can break withIntegrityError
when trying to delete the Pages in themigration_cleanup
step.Before deleting a page:
I'm not sure this is the right approach depending on your models, e.g. this will also re-assign CMS Page Permissions which might not be desired. However, this was blocking the deletion of the superfluous Page objects and this code unblocked that step.