[Erp5-report] r18546 - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 28 15:29:25 CET 2007


Author: vincent
Date: Fri Dec 28 15:29:25 2007
New Revision: 18546

URL: http://svn.erp5.org?rev=18546&view=rev
Log:
Do not put any entry in movement dict when there is no movement.

Modified:
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=18546&r1=18545&r2=18546&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py Fri Dec 28 15:29:25 2007
@@ -205,17 +205,17 @@
       if self.index.has_key(base_id):
         # Look at each dimension i of the previous index
         for i in self.index[base_id].keys():
-          temp = {}
           # If the new index has the same dimensionality
           # Look at new location of cells
           if new_index.has_key(i):
+            temp = {}
             # Look at each index in a given dimension i
             for my_id in self.index[base_id][i].keys():
               new_place = new_index[i].get(my_id)
               old_place = self.index[base_id][i][my_id]
               # create a movement in dimension i between old_place and new_place
               temp[old_place] = new_place
-          movement[i] = temp
+            movement[i] = temp
 
       # Rename every 'object_id' by 'temp_object_id'
       object_id_list = []




More information about the Erp5-report mailing list