From c81f1231d44de77e571446cb97413c9a0a2204a3 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Thu, 9 Dec 2004 14:05:57 +0000 Subject: [PATCH] make sure the validator is working with one dimension matrix git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1970 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/MatrixBox.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/product/ERP5Form/MatrixBox.py b/product/ERP5Form/MatrixBox.py index 1f5b233672..0d495368dc 100755 --- a/product/ERP5Form/MatrixBox.py +++ b/product/ERP5Form/MatrixBox.py @@ -289,6 +289,8 @@ class MatrixBoxValidator(Validator.Validator): # This is required when we have no tabs if len(tabs) == 0: tabs = [(None,None)] + # This is required when we have no columns + if len(columns) == 0: columns = [(None,None)] column_ids = map(lambda x: x[0], columns) line_ids = map(lambda x: x[0], lines) @@ -307,7 +309,9 @@ class MatrixBoxValidator(Validator.Validator): for l in line_ids: j = 0 for c in column_ids: - if tab_id is None: + if c is None: + kw = [l] + elif tab_id is None: kw = [l, c] else: kw = [l, c] + tab_id -- 2.30.9