The test on line 930 of forms.py return false because the types are different
if option_value == value:
The problem occurs when saving form data to a cherrypy session than retrieving it again.
the code to save value on session is folows:
cherrypy.session["path"].append({
"key":self.link,
"path":path,
"values":values.copy(),
"lookup_field":field[0:field.find('_lookup_new')]
})
after code to retrieve data from session is:
temp = cherrypy.session["path"].pop()
data = temp["values"]
the test above (line 930) never return True when type of "option_value" is different from unicode, because type of "option" returns unicode.
The fast way to correct this is enclosing both by unicode function like bellow, but I don't know if it will cause another inconsistence.
if unicode(option_value) == unicode(value):
the code above was used in an attemp to extend the SingleSelect Widget to give it some more options, but I think this error can occurs also in other situations.