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 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -74,7 +71,7 @@ delivery_movement = simulation_movement.getDeliveryValue()\n ...@@ -74,7 +71,7 @@ delivery_movement = simulation_movement.getDeliveryValue()\n
\n \n
if delivery_movement is not None:\n if delivery_movement is not None:\n
delivery = delivery_movement.getExplanationValue()\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 delivery.activate(\n
after_path_and_method_id=(delivery_movement.getPath(),\n after_path_and_method_id=(delivery_movement.getPath(),\n
(\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n (\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).calculate()\n
...@@ -145,6 +142,7 @@ if delivery_movement is not None:\n ...@@ -145,6 +142,7 @@ if delivery_movement is not None:\n
<string>delivery_movement</string> <string>delivery_movement</string>
<string>None</string> <string>None</string>
<string>delivery</string> <string>delivery</string>
<string>getattr</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
486 485
\ 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