Commit 55375918 authored by Nicolas Delaby's avatar Nicolas Delaby

test if calculate methods exists before calling

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16789 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf7416da
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -74,7 +71,7 @@ delivery_movement = simulation_movement.getDeliveryValue()\n
\n
if delivery_movement is not None:\n
delivery = delivery_movement.getExplanationValue()\n
if delivery.getCausalityState() != \'draft\':\n
if delivery.getCausalityState() != \'draft\' and getattr(delivery, \'calculate\', None) is not None:\n
delivery.activate(\n
after_path_and_method_id=(delivery_movement.getPath(),\n
(\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n
......@@ -145,6 +142,7 @@ if delivery_movement is not None:\n
<string>delivery_movement</string>
<string>None</string>
<string>delivery</string>
<string>getattr</string>
</tuple>
</value>
</item>
......
486
\ No newline at end of file
485
\ 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