workflow: ignore empty items on workflow import (#31823)

This commit is contained in:
Nicolas Roche 2019-08-29 11:59:36 +02:00 committed by Frédéric Péters
parent 7ad20714aa
commit 0cf37e198d
2 changed files with 2 additions and 2 deletions

View File

@ -568,7 +568,7 @@ def test_sms(pub):
st1 = wf.add_status('Status1', 'st1')
sendsms = SendSMSWorkflowStatusItem()
sendsms.to = ['0123456789']
sendsms.to = ['0123456789', '']
sendsms.body = 'hello'
st1.items.append(sendsms)
sendsms.parent = st1

View File

@ -832,7 +832,7 @@ class XmlSerialisable(object):
continue
if list(el):
if type(getattr(self, attribute)) is list:
v = [x.text.encode(charset) for x in el]
v = [x.text.encode(charset) if x.text is not None else '' for x in el]
elif type(getattr(self, attribute)) is dict:
v = {}
for e in el: