﻿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
10413	RelatedManager.add fails silently when adding an object of the wrong type	David Gouldin	nobody	"When trying to add an object of the wrong type using a related manager, Django fails silently rather than complaining as specified in the docs:

http://docs.djangoproject.com/en/dev/topics/db/queries/#saving-foreignkey-and-manytomanyfield-fields

Example:

{{{
class ParentModel(models.Model):
    name = models.CharField(max_length=200)

class ChildModel(models.Model):
    name = models.CharField(max_length=200)
    parent = models.ForeignKey(ParentModel, related_name=""child_models"")

class NotAChildModel(models.Model):
    name = models.CharField(max_length=200)

p = ParentModel(name='Parent')
p.save()
nc = NotAChildModel(name='Not A Child')
nc.save()
p.child_models.add(nc) # This should blow up, but doesn't
p.child_models.all() # Returns []
}}}

"		closed	Database layer (models, ORM)	1.0		fixed		dgouldin@…	Ready for checkin	1	0	0	0	0	0
