Commit bf91dfd1 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify conditions.

parent 396dda04
...@@ -62,13 +62,12 @@ except ValueError, e:\n ...@@ -62,13 +62,12 @@ except ValueError, e:\n
if context.getSimulationState() not in [\'planned\', \'confirmed\']:\n if context.getSimulationState() not in [\'planned\', \'confirmed\']:\n
return\n return\n
\n \n
if context.getSimulationState() == \'confirmed\':\n if context.PaymentTransaction_getPreviousPayzenId() is not None and context.getStartDate() is None:\n
portal.system_event_module.newContent(title=\'Transaction %s Payzen status update\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).updateStatus()\n
return\n
elif context.PaymentTransaction_getPreviousPayzenId() is not None:\n
context.setStartDate(DateTime())\n context.setStartDate(DateTime())\n
context.updateCausalityState()\n context.updateCausalityState()\n
portal.system_event_module.newContent(title=\'Transaction %s Payzen registration\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).registerPayzen()\n portal.system_event_module.newContent(title=\'Transaction %s Payzen registration\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).registerPayzen()\n
else:\n
portal.system_event_module.newContent(title=\'Transaction %s Payzen status update\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).updateStatus()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
64 65
\ 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