The patch regards MultiSelectFieldMixin.selected. The
current implementation fails, if the keys from the
original selection to build the checkboxes are strings.
I suggest the following implementation (copy from HTML
source view)::
def selected(self, key, default):
"""Return true if the selection's key matches
the default(s)."""
if isinstance(default, StringType):
return default and str(key) == str(default)
else:
# make rebinding to new name explicit
default_ = map(str, default)
return default_ and str(key) in default_
Stefan
Logged In: YES
user_id=383516
Another approach is to convert the first "column" in every
selection to strings. This would mean to modify
SelectField.__init__ in Field.py:
# current code
self._selections = selections or []
# change to
selections = selections or []
self._selections = [ (str(key), value) for (key, value) in
selections ]