﻿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
2424	Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined	chengqi@…	Jacob	"= Descriptions =
 * Django_admin will report errors when try to save objects, where another object, which has a many_to_many field, is edit_inlined

= This is my model =
{{{
#!python
Class A:
    ....

Class B:
    field = ManyToManyField(ClassC);
    a = ForeignKey(A, edit_inline=meta.STACKED)
}}}

== Reproduce steps ==
 * Then when I try to create a A object in django_admin, it will report errors as 'set_field' not exist..

= Django codes related =

== django/db/models/manipulator.py ==
 * line 217 
{{{
#!python
for f in related.opts.many_to_many:
   if child_follow.get(f.name, None) and not f.rel.edit_inline:
        was_changed = getattr(new_rel_obj, 'set_%s' % f.name)(rel_new_data[f.attname])
   if self.change and was_changed:
        self.fields_changed.append('%s for %s ""%s""' % (f.verbose_name, related.opts.verbose_name,
}}}
"	defect	closed	Metasystem	magic-removal	normal	duplicate			Unreviewed	0	0	0	0	0	0
