Commit 62e09538 authored by Nicolas Delaby's avatar Nicolas Delaby

detect None values in workflow

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35796 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69b59cac
...@@ -139,8 +139,11 @@ def Base_asXML(object, root=None): ...@@ -139,8 +139,11 @@ def Base_asXML(object, root=None):
variable_type = "date" variable_type = "date"
if workflow_variable.find('language_revs') >= 0: # XXX specific to cps if workflow_variable.find('language_revs') >= 0: # XXX specific to cps
variable_type = "dict" variable_type = "dict"
if workflow_action[workflow_variable] is None:
variable_type = 'None'
variable_node = SubElement(workflow_node, workflow_variable, variable_node = SubElement(workflow_node, workflow_variable,
attrib=dict(type=variable_type)) attrib=dict(type=variable_type))
if variable_type != 'None':
variable_node_text = str(workflow_action[workflow_variable]) variable_node_text = str(workflow_action[workflow_variable])
variable_node.text = unicode(variable_node_text, 'utf-8') variable_node.text = unicode(variable_node_text, 'utf-8')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment