#13087: m2m_changed fires before a clear but after add/remove
---------------------------+------------------------------------------------
 Reporter:  rcatherman     |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.2-beta  
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 In db/models/fields/related.py I notice that _add_items and _remove_items
 perform the db actions and then fire the signal to the m2m_changed
 listeners.  _clear_items fires the signal prior to the db interaction.
 The result is inconsistent.  For my use case, I'd like to have my listener
 assert a relationship has at least one particular item no matter if it is
 accidentily cleared.  It works on removal, but not on clear because I
 notice the DELETE happens after my re-INSERT.

 I've made the change here and it works as expected now.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13087>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to