Fix error when assigning form values that include booleans.

This commit is contained in:
Lance Stout 2012-03-16 22:02:21 -07:00
parent 19a6f61b44
commit a6f3d740a2

View file

@ -138,6 +138,8 @@ class FormField(ElementBase):
valXML.text = '0' valXML.text = '0'
self.xml.append(valXML) self.xml.append(valXML)
elif self._type in self.multi_value_types or self._type in ('', None): elif self._type in self.multi_value_types or self._type in ('', None):
if isinstance(value, bool):
value = [value]
if not isinstance(value, list): if not isinstance(value, list):
value = value.replace('\r', '') value = value.replace('\r', '')
value = value.split('\n') value = value.split('\n')