From 0ae01ef3d0214d342effbe2ff1d202d35ec00559 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Thu, 11 Mar 2010 13:53:33 +0000 Subject: [PATCH] Fix issue when an XMLMatrix has child objects that are not Cells: in this case _checkConsistency should not examine those children objects. It might be better to filter portal types directly in contentValues. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33648 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/XMLMatrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py index 416549a10f..fa69254aa6 100644 --- a/product/ERP5Type/XMLMatrix.py +++ b/product/ERP5Type/XMLMatrix.py @@ -646,7 +646,8 @@ class XMLMatrix(Folder): # the last item is a coordinate not part of base_id object_id_split.pop() - if base_id is not None: + current_dimension = len(cell_coordinate_list) + if current_dimension > 0 and base_id is not None: if not self.index.has_key(base_id): # The matrix does not have this base_id addError("There is no index for base_id %s" % base_id) @@ -665,7 +666,6 @@ class XMLMatrix(Folder): del base_item[key] len_id = len(base_item) - current_dimension = len(cell_coordinate_list) if current_dimension != len_id: addError("Dimension of cell is %s but should be %s" % (current_dimension, len_id)) -- 2.30.9