Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Bulk Action on Snippets does not respect "on_delete=models.PROTECT" on "ForeignKeys" #11922

Open
LCMJ21 opened this issue May 2, 2024 · 0 comments
Labels
status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. type:Bug

Comments

@LCMJ21
Copy link

LCMJ21 commented May 2, 2024

Issue Summary

If a model is registered as a Snippet, and it has a ForeignKey that has the attribute on_delete=models.PROTECT, the Delete Bulk Action will not respect this condition.

Steps to Reproduce

  1. Create a model that has a models.ForeignKey with the property on_delete=models.PROTECT.
  2. Add a wagtail_hooks.py and register a SnippetViewSet of that model.
  3. Use Delete Bulk Action

Technical details

  • Django version: 5.0.3
  • Wagtail version: 6.0.1
  • Browser version: You can use Chrome 123 to find this out.
@LCMJ21 LCMJ21 added status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. type:Bug labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. type:Bug
Projects
None yet
Development

No branches or pull requests

1 participant