Commit 0977c87c authored by Romain Courteaud's avatar Romain Courteaud

Prevent raising an error when value of a ListField is not in the item list.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0169d11e
...@@ -113,8 +113,14 @@ dQEAAAAA</string> </value> ...@@ -113,8 +113,14 @@ dQEAAAAA</string> </value>
tal:content="value">\n tal:content="value">\n
</text:p>\n </text:p>\n
<tal:block tal:condition="python: value != \'\'">\n <tal:block tal:condition="python: value != \'\'">\n
<text:p tal:condition="item_list"\n \n
tal:content="python: [str(i[0]).replace(\'&amp;\', \'\') for i in item_list if i[1] == value][0]">\n <text:p tal:condition="item_list">\n
<tal:block tal:define="displayed_value_list python: [str(i[0]).replace(\'&amp;\', \'\') for i in item_list if i[1] == value]">\n
<tal:block tal:condition="displayed_value_list"\n
tal:replace="python: displayed_value_list[0]" />\n
<tal:block tal:condition="not: displayed_value_list"\n
tal:replace="python: value" />\n
</tal:block>\n
</text:p>\n </text:p>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: value is None">\n <tal:block tal:condition="python: value is None">\n
......
202 203
\ No newline at end of file \ 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