Commit 247a3f4d authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_simulation: fix the case when it's a list

parent 763b463b
......@@ -98,10 +98,15 @@ class SolverProcessTool(BaseTool):
# XXX using delivery's solver category is not so good idea,
# because we might want to solve several deliveries with one
# solver process, several users want to solve one document etc.
delivery = delivery_or_movement.getRootDeliveryValue()
solver_list = delivery.getSolverValueList()
solver_list.append(new_solver)
delivery.setSolverValueList(solver_list)
if not isinstance(delivery_or_movement, (tuple, list)):
delivery_or_movement = [delivery_or_movement]
for x in delivery_or_movement:
delivery = x.getRootDeliveryValue()
solver_list = delivery.getSolverValueList()
if new_solver not in solver_list:
solver_list.append(new_solver)
delivery.setSolverValueList(solver_list)
return new_solver
......
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