Commit 20f223d2 authored by Aurel's avatar Aurel

when checking diff of workflow chains, compare list instead of string

to avoid ordering difference and thus getting "fake" diff


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34402 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c9c9042b
......@@ -1984,10 +1984,12 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
# compare object to see it there is changes
new_object = self._objects[path]
old_object = installed_item._objects[path]
if isinstance(new_object, (list, tuple)):
new_object = self._chain_string_separator.join(new_object)
if isinstance(old_object, (list, tuple)):
old_object = self._chain_string_separator.join(old_object)
if isinstance(new_object, str):
new_object = new_object.split(self._chain_string_separator)
if isinstance(old_object, str):
old_object = old_object.split(self._chain_string_separator)
new_object.sort()
old_object.sort()
if new_object != old_object:
modified_object_list.update({path : ['Modified', self.getTemplateTypeName()]})
else: # new 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