Commit 664eb897 authored by Łukasz Nowak's avatar Łukasz Nowak

Use system event instead of raising in case of unconfigured system.

parent 18f1598f
...@@ -52,7 +52,13 @@ ...@@ -52,7 +52,13 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
service = portal.portal_secure_payments.find()\n service = None\n
try:\n
service = portal.portal_secure_payments.find()\n
except ValueError, e:\n
portal.system_event_module.newContent(title=\'Transaction %s cannot be updated, because of service error: %s\' % (context.getTitle(), e), portal_type=\'Payzen Event\', source_value=service, destination_value=context).submit()\n
return\n
\n
if context.getSimulationState() not in [\'planned\', \'confirmed\']:\n if context.getSimulationState() not in [\'planned\', \'confirmed\']:\n
return\n return\n
\n \n
......
55 56
\ 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