﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29615	Document difference in behaviour between m2m_changed behaviour for add() vs remove() when called multiple times.	nirmalraghavan	Sanyam Khurana	"Consider the following Model,


{{{
class MyModel(models.Model):
    likes = models.ForeignKey(User)
}}}


Now if I add a user to the likes field as below,
myObj.likes.add(user)

my m2m_changed receiver method will be called in signals module with action post_add. And if I try to add the same user again. nothing will happen which is fine.

And when I try to remove the user as below,
myObj.likes.remove(user)

m2m_changed receiver method is called with action post_remove. And if I try to remove the same user again, this time also m2m_changed receiver method is called. Even if there's no such user exist in ManyToMany field, django will emit post_remove signal."	Cleanup/optimization	closed	Documentation	2.0	Normal	duplicate	signals, m2m_changed		Accepted	0	0	0	1	0	0
