From b02ba34338a3470e6b4287ebfb8ef4d11f0aee94 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Thu, 18 Feb 2010 10:07:24 +0000
Subject: [PATCH] simplification

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32745 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/XMLMatrix.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py
index 88090d8287..1e3ca09d38 100644
--- a/product/ERP5Type/XMLMatrix.py
+++ b/product/ERP5Type/XMLMatrix.py
@@ -688,9 +688,10 @@ class XMLMatrix(Folder):
                   del base_item[key]
 
               len_id = len(base_item)
-              if len(object_id_split) != (len_id + base_id_len): # +1 for the quantity
-                addError("Dimension of cell is %s but should be %s" % (len(object_id_split)
-                                                                            - base_id_len, len_id))
+              current_dimension = len(object_id_split) - base_id_len
+              if current_dimension != len_id: # +1 for the quantity
+                addError("Dimension of cell is %s but should be %s" % (current_dimension,
+                                                                       len_id))
                 to_delete_set.add(object_id)
               else :
                 for i in range(len_id):
-- 
2.30.9