﻿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
5481	ChoiceField/ModelChoiceField always returns strings, regardless of type in choices	Robert Coup	nobody	"{{{
f = ChoiceField(choices=((1,'1'), (2,'2')))
f.clean('1')
u'1'
# expected: 1 (integer)
}}}

While normally this doesn't cause problems (models are pretty good about accepting strings) it can be extra hassle for custom forms.

The attached patch changes the behaviour of ChoiceField and ModelChoiceField to return exactly what was specified in choices (be it integer, string, unicode, whatever). "		closed	Forms	dev		wontfix	sprint14sep	philippe.raoult@…	Accepted	1	0	0	1	0	0
