Skip to content

Conversation

@jeremystretch
Copy link
Member

Fixes: #14079

This extends the handle_deleted_object() signal receiver to inspect objects being deleted for reverse many-to-many relationships. For any that are found, we query the related model for objects associated with the object being deleted, and manually delete the association by calling remove() on the remote M2M field. This triggers an m2m_changed signal for the related object, ensuring that the change is logged.

@jeremystretch jeremystretch merged commit bd7d4a3 into develop Feb 16, 2024
@jeremystretch jeremystretch deleted the 14079-fix-reverse-m2m-change-logging branch February 16, 2024 16:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing change log entries for updated many-to-many fields as part of deletes

3 participants