I need to detect a post_remove signal, so I have written :
def handler1(sender, instance, action, reverse, model, pk_set, **kwargs):
if (action == \'post_rem
As I understand it, it's not a bug, it's just that Django does not update m2m relations in the way you expect. It does not remove the relations to be deleted then add the new ones. Instead, it clears all of the m2m relations, then adds them again.
There's a related question Django signal m2m_changed not triggered which links to ticket 13087.
So you can check for the pre_clear
or post_clear
action with the m2m_changed
signal, but since those actions do not provide pk_set
, it doesn't help you find the related entries before the save, as you wanted to do in your other question.