[Erp5-report] r34402 aurel - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 8 17:15:41 CEST 2010


Author: aurel
Date: Thu Apr  8 17:15:38 2010
New Revision: 34402

URL: http://svn.erp5.org?rev=34402&view=rev
Log:
when checking diff of workflow chains, compare list instead of string
to avoid ordering difference and thus getting "fake" diff

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=34402&r1=34401&r2=34402&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Apr  8 17:15:38 2010
@@ -1984,10 +1984,12 @@
           # 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




More information about the Erp5-report mailing list