If there are choices more than 10 when using CheckboxSelectMultiple or SelectMultiple, different options from the original become selected.
|Reported by:||Naoya Niwa <mine@…>||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
MultipleChoiceField is stored in the database the data in serialized array like "[u'4', u'13']" . However, because the widget does not deserialize when reading it, the results shown is incorrect.
In version 1.4.5, the problem occurs in the 568 line and 548 line of "django/forms/widgets.py".
If one digit, for example, "[u'9']" is converted to "set([u"'", u'9', u', u?', u'u'])" by "set([force_unicode(v) for v in value])", there is no problem in the process to match one by one index number.However, in the case of multi-digit numbers, and thus, for example, "[u'13']" is converted to "set([u"'", u'1', u'3', u', u?', u'u'])", 1 and 3 in the zero-based index is selected.