Commit 66cc5bfa authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_simulation: Display Divergence dialog even if there is nothing to solve...

erp5_simulation: Display Divergence dialog even if there is nothing to solve (same as legacy Simulation Dialog).

This fixes the following Site Error when there is no Divergence to solve:
  AttributeError: 'NoneType' object has no attribute 'SolverProcess_getSolverDecisionList'

This may happen if user selects 'Solve Divergence' Action and solve
Divergences, then immediately goes back and selects again this action
whereas there is actually no Divergence to solve.
parent 13c0f2e1
solver_process = context.Delivery_getSolverProcess()
if solver_process is None:
return []
# XXX should omit 'solved' decision?
return solver_process.SolverProcess_getSolverDecisionList()
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