Commit 19534c6a authored by Fabien Morin's avatar Fabien Morin

fix a mistake (s/render_odt/render_odg/g) and replace the node only if it's not

a None node. Currently, this can exists because render_odg is under developpment,
so there is no render_odg for all fields yet (if render_odg is not overloaded
for each field, the default method return None).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31214 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a1e6b096
......@@ -957,5 +957,7 @@ class ODGStrategy(ODFStrategy):
for target_node in node_list:
attr_dict = {}
attr_dict.update(target_node.attrib)
new_node = field.render_odt(attr_dict=attr_dict)
parent_node = target_node.getparent().replace(target_node, new_node)
new_node = field.render_odg(attr_dict=attr_dict)
if new_node is not None: # XXX None node exists because render_odg is
# not yet writed for all fields, but it should
parent_node = target_node.getparent().replace(target_node, new_node)
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