Fix error when assigning form values that include booleans.
This commit is contained in:
parent
19a6f61b44
commit
a6f3d740a2
1 changed files with 2 additions and 0 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue