[FIX] models: export of booleans
In the case of a `raw_data` export, a boolean which has the value `False` will not be exported correctly. The fix handles the `False` value as a valid value for a field. opw-666142
This commit is contained in:
parent
ee33593351
commit
68f9f99ed3
|
@ -907,10 +907,10 @@ class BaseModel(object):
|
|||
if lines2:
|
||||
# merge first line with record's main line
|
||||
for j, val in enumerate(lines2[0]):
|
||||
if val:
|
||||
if val or isinstance(val, bool):
|
||||
current[j] = val
|
||||
# check value of current field
|
||||
if not current[i]:
|
||||
if not current[i] and not isinstance(current[i], bool):
|
||||
# assign xml_ids, and forget about remaining lines
|
||||
xml_ids = [item[1] for item in value.name_get()]
|
||||
current[i] = ','.join(xml_ids)
|
||||
|
|
Loading…
Reference in New Issue