Commit 44afbfd6 authored by Aurel's avatar Aurel

don't fail if resource not found in monetary reception init

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7568 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e7d1fa1d
...@@ -69,8 +69,12 @@ ...@@ -69,8 +69,12 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>currency = context.Baobab_getPortalReferenceCurrencyID()\n <value> <string>currency = context.Baobab_getPortalReferenceCurrencyID()\n
currency_object = context.restrictedTraverse(\'currency_module/%s\' %(currency,))\n try:\n
context.setResourceValue(currency_object)\n currency_object = context.restrictedTraverse(\'currency_module/%s\' %(currency,))\n
context.setResourceValue(currency_object)\n
except KeyError:\n
context.log("MonetaryReception_init", "Cannot set resource value for object %s" %(context,))\n
pass\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -117,6 +121,7 @@ context.setResourceValue(currency_object)\n ...@@ -117,6 +121,7 @@ context.setResourceValue(currency_object)\n
<string>context</string> <string>context</string>
<string>currency</string> <string>currency</string>
<string>currency_object</string> <string>currency_object</string>
<string>KeyError</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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