Commit ace56db3 authored by Aurel's avatar Aurel

in preinstall for workflow, diff all subobjects to know if workflow is modified


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5553 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0efd1e02
......@@ -956,7 +956,6 @@ class WorkflowTemplateItem(ObjectTemplateItem):
portal = context.getPortalObject()
new_keys = self._objects.keys()
for path in new_keys:
if len(path.split('/')) == 2:
if installed_bt._objects.has_key(path):
# compare object to see it there is changes
new_object = self._objects[path]
......@@ -970,7 +969,8 @@ class WorkflowTemplateItem(ObjectTemplateItem):
new_io.close()
old_io.close()
if new_obj_xml != old_obj_xml:
modified_object_list.update({path : ['Modified', 'Workflow']})
wf_id = path.split('/')[:2]
modified_object_list.update({'/'.join(wf_id) : ['Modified', 'Workflow']})
else: # new object
modified_object_list.update({path : ['New', 'Workflow']})
# get removed object
......
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