workflow: ignore empty items on workflow import (#31823)
This commit is contained in:
parent
7ad20714aa
commit
0cf37e198d
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue