Commit 31a8929a authored by Nicolas Dumazet's avatar Nicolas Dumazet

Silence Matrix rendering errors


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33738 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04c33aed
......@@ -91,6 +91,11 @@ for c in ([line_base_category, column_base_category] + tab_base_category_list):\
# Remove empty range\n
cell_range = filter(lambda x: x != [], cell_range)\n
\n
dimension = len(cell_range)\n
if matrixbox and dimension<3:\n
# Matrixbox view always expects three dimensions (lines, columns, tabs)\n
# It costs very little to avoid noisy rendering tracebacks\n
return cell_range + [[]]*(3-dimension)\n
return cell_range\n
......@@ -147,6 +152,8 @@ return cell_range\n
<string>getattr</string>
<string>_getitem_</string>
<string>map</string>
<string>len</string>
<string>dimension</string>
</tuple>
</value>
</item>
......
469
\ No newline at end of file
470
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment