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

erp5_simulation: fix the case when it's a list

parent 763b463b
......@@ -98,8 +98,13 @@ 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()
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)
......
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