Changes between Initial Version and Version 1 of Ticket #24738, comment 3


Ignore:
Timestamp:
May 2, 2015, 4:52:54 PM (10 years ago)
Author:
No-0n3

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24738, comment 3

    initial v1  
    33I looked at #6707 and it isn't a problem about M2M in admin I'm talking about. Installed the master branch from github and tested.
    44
    5 My I'm trying to delete all objects from the database that doesn't have any relation by signaling that the relationship has been changed with the "m2m_changed" signal.
     5I'm trying to delete all objects from the database that doesn't have any relation by signaling that the relationship has been changed with the "m2m_changed" signal.
    66
    77If I delete a model through the shell with "<object>.delete()", then no "m2m_changed" signal is sent that any relations has been changed in any way.
     
    5252}}}
    5353
    54 No signal is sent at deletetion of a related object to that changed the relations by deleting the object. Sorry but it isn't a duplication.
     54No 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 happen when the object is deleted.
    5555
    5656Entire code:
Back to Top