﻿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
16818	Regression introduced by r16739 -- `ManyRelatedManager.add()` doesn't commit to database	Daniel Swarbrick	nobody	"Models are as follows (simplified):

{{{
class OrgUnit(models.Model):
    name = models.CharField(max_length=64, unique=True)
    description = models.CharField(_('description'), max_length=128)

class UserProfile(models.Model):
    user = models.ForeignKey(User, unique=True)
    favourites = models.ManyToManyField(OrgUnit, blank=True)
}}}

Following code does not work as it used to (in a view):

{{{
fav_list = request.user.get_profile().favourites
orgunit = OrgUnit.objects.get(pk=13)
fav_list.add(orgunit)
}}}

Immediately after the fav_list.add(), fav_list appears to contain the orgunit (cached), but it is not committed to the database (Postgres).

Reverting to r16738 restores the correct behaviour."	Bug	closed	Database layer (models, ORM)	dev	Release blocker	fixed		real.human@…	Accepted	1	0	0	0	0	0
