﻿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
540	ManyToManyField gives error with blank, raw_id_admin and empty input	wojtek3@…	Adrian Holovaty	"If you define the following field:

{{{
    tags = meta.ManyToManyField(Tag, blank=True, raw_id_admin=True)
}}}

And provide no input for the 'tags' field in the HTML form for the addition of the given model.  You get this error (although blank=True should cause it to work fine):

{{{
There's been an error:

Traceback (most recent call last):

  File ""d:\django\django\core\handlers\base.py"", line 64, in get_response
    response = callback(request, **param_dict)

  File ""i:\projects\grono2\contrib\web\create_update.py"", line 51, in create_object
    new_object = manipulator.save(new_data)

  File ""d:\django\django\utils\functional.py"", line 3, in _curried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))

  File ""d:\django\django\core\meta\__init__.py"", line 1483, in manipulator_save
    was_changed = getattr(new_object, 'set_%s' % f.name)(new_data.getlist(f.name))

  File ""d:\django\django\utils\functional.py"", line 3, in _curried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))

  File ""d:\django\django\core\meta\__init__.py"", line 896, in method_set_many_to_many
    id_list = map(int, id_list) # normalize to integers

ValueError: invalid literal for int(): 
}}}"	defect	closed	Core (Other)		normal	fixed			Unreviewed	0	0	0	0	0	0
