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

Manually cascade delete M2M models when related model is deleted. #1330

Open
1 of 7 tasks
rithviknishad opened this issue Jun 2, 2023 · 0 comments
Open
1 of 7 tasks

Comments

@rithviknishad
Copy link
Member

Describe the bug
Currently, most M2M models are not deleted when their related model is deleted. The on_delete doesn't take effect as we use soft delete for all the models that inherits from BaseModel.

Expected behavior
ModelAB should be updated to deleted=True when ModelA or ModelB is deleted.

Many to Many models in CARE that are potentially having this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant