From 78e510512f303b4d3cafdb29a752368afe9178c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 25 Mar 2010 17:24:48 +0000
Subject: [PATCH] be more robust for broken item fields

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34130 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml | 3 ++-
 bt5/erp5_ods_style/bt/revision                                 | 2 +-
 .../SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml | 1 +
 bt5/erp5_odt_style/bt/revision                                 | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml
index 571b0e622e..11a8f6dbc3 100644
--- a/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml
+++ b/bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.xml
@@ -114,7 +114,8 @@ dQEAAAAA</string> </value>
                             <tal:block tal:condition="python: same_type(value, []) or same_type(value, ())">\n
                               <tal:block tal:repeat="item value">\n
                                 <text:p tal:condition="not:item_list" tal:content="item"></text:p>\n
-                                <text:p tal:condition="item_list" tal:content="python: [i[0] for i in item_list if i[1] == item][0]"></text:p>\n
+                                <text:p tal:condition="item_list" tal:content="python: [i[0] for i in item_list if i[1] == item][0]"\n
+                                        tal:on-error="item"></text:p>\n
                               </tal:block>\n
                             </tal:block>\n
 \n
diff --git a/bt5/erp5_ods_style/bt/revision b/bt5/erp5_ods_style/bt/revision
index d903d59723..20ad60520b 100644
--- a/bt5/erp5_ods_style/bt/revision
+++ b/bt5/erp5_ods_style/bt/revision
@@ -1 +1 @@
-229
\ No newline at end of file
+230
\ No newline at end of file
diff --git a/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml b/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml
index 806d488559..4e0ec4166b 100644
--- a/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml
+++ b/bt5/erp5_odt_style/SkinTemplateItem/portal_skins/erp5_odt_style/form_view.xml
@@ -368,6 +368,7 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value>
                            tal:condition="not:item_list"/>\n
                       <text:p text:style-name=\'field-content\'\n
                            tal:content="python: [i[0] for i in item_list if i[1] == item][0]"\n
+                           tal:on-error="item"\n
                            tal:condition="item_list" />\n
                     </tal:block>\n
                   </tal:block>\n
diff --git a/bt5/erp5_odt_style/bt/revision b/bt5/erp5_odt_style/bt/revision
index 7730ef7f3e..0fa6a7b088 100644
--- a/bt5/erp5_odt_style/bt/revision
+++ b/bt5/erp5_odt_style/bt/revision
@@ -1 +1 @@
-89
\ No newline at end of file
+90
\ No newline at end of file
-- 
2.30.9