Commit fac33603 authored by Romain Courteaud's avatar Romain Courteaud

Calculate solver_script_list only once.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12494 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 731edfe9
......@@ -68,6 +68,13 @@ class CategoryDivergenceTester(PropertyDivergenceTester):
"""
divergence_message_list = []
tested_property = self.getTestedPropertyList()
# Get the solver script list
solver_script_list = self.getSolverScriptList()
if solver_script_list is None:
solver_script_list = []
solver_script_list=self._splitStringList(solver_script_list)
for tested_property_id, tested_property_title in \
self._splitStringList(tested_property):
delivery_mvt = simulation_movement.getDeliveryValue()
......@@ -103,17 +110,14 @@ class CategoryDivergenceTester(PropertyDivergenceTester):
delivery_mvt_property = ' , '.join(delivery_mvt_category_title_list)
simulation_mvt_property = ' , '.join(simulation_category_title_list)
solver_script_list = self.getSolverScriptList()
if solver_script_list is None:
solver_script_list = []
message = ObjectMessage(object_relative_url= delivery_mvt.getRelativeUrl(),
message = ObjectMessage(
object_relative_url= delivery_mvt.getRelativeUrl(),
simulation_movement = simulation_movement,
decision_value = delivery_mvt_property ,
prevision_value = simulation_mvt_property,
tested_property=tested_property_id,
message=tested_property_title,
solver_script_list=self._splitStringList(solver_script_list)
solver_script_list=solver_script_list
)
divergence_message_list.append(message)
......
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