Commit ccda54ac authored by Alexandre Boeglin's avatar Alexandre Boeglin

Because Payment Transaction does not have a causality workflow, we cannot...

Because Payment Transaction does not have a causality workflow, we cannot assume that getCausalityState will always be present.
This getattr test needs to be removed once Payment Transaction is linked to a correct causality workflow.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16865 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a98bf49
......@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
......@@ -71,7 +74,11 @@ delivery_movement = simulation_movement.getDeliveryValue()\n
\n
if delivery_movement is not None:\n
delivery = delivery_movement.getExplanationValue()\n
if delivery.getCausalityState() != \'draft\':\n
# Because Payment Transaction does not have a causality workflow, we cannot assume that\n
# getCausalityState will always be present. This getattr test needs to be removed once\n
# Payment Transaction is linked to a correct causality workflow.\n
if getattr(delivery, \'getCausalityState\', None) is not None \\\n
and delivery.getCausalityState() != \'draft\':\n
delivery.activate(\n
after_path_and_method_id=(delivery_movement.getPath(),\n
(\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n
......@@ -142,6 +149,7 @@ if delivery_movement is not None:\n
<string>delivery_movement</string>
<string>None</string>
<string>delivery</string>
<string>getattr</string>
</tuple>
</value>
</item>
......
505
\ No newline at end of file
507
\ 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