﻿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
1334	[magic-removal][patch] `save` method of `AutomaticManipulator` broken for `ManyToManyField`s	limodou@…	Adrian Holovaty	"In models/manipulator.py's save() function, there is a bug that using the old-style manipulator method set_XXX, so as saving manytomany field, just like save group object in Admin, it'll be failed. So I made this patch. 

And I also found that in fields/related.py, 

    rowcount = cursor.execute(""SELECT %s FROM %s WHERE %s = %%s AND %s IN (%s)"" % \
        (rel_col_name, join_table, this_col_name,
        rel_col_name, "","".join(['%s'] * len(new_ids))), 
        [this_pk_val] + list(new_ids))
    existing_ids = set([row[0] for row in cursor.fetchmany(rowcount)])

if there is no records after executing the SELECT, the rowcount will be None, so cursor.fetchmany(rowcount) will be failed. The patch also including fix this."	defect	closed	Core (Other)	magic-removal	normal	wontfix			Unreviewed	1	0	0	0	0	0
