Changes between Version 1 and Version 2 of Ticket #24738, comment 3
- Timestamp:
- May 2, 2015, 5:02:33 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24738, comment 3
v1 v2 52 52 }}} 53 53 54 No signal is sent at deletion of a related object when the relation was broken by deleting the object. Sorry but it isn't a duplication. Because I don't get any output that the signal function has run as when I ran the "add"-relation function and the related objects are still there without any relation to a object. If I uncomment the second function that catch a "pre_delete" and explicitly call "clear()" on the M2M-field I receive a "m2m_changed" signal and all records without a related object are deleted. According to docs "m2m_changed" was a signal that is sent when the relationship between the 2 objects are changed, which happenwhen the object is deleted.54 No signal is sent at deletion of a related object when the relation was broken by deleting the object. Sorry but it isn't a duplication. Because I don't get any output that the signal function has run as when I ran the "add"-relation function and the related objects are still there without any relation to a object. If I uncomment the second function that catch a "pre_delete" and explicitly call "clear()" on the M2M-field I receive a "m2m_changed" signal and all records without a related object are deleted. According to docs "m2m_changed" was a signal that is sent when the relationship between objects are changed, which happens when the object is deleted. 55 55 56 56 Entire code: