Commit c84f39af 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 b78933f1
......@@ -51,6 +51,9 @@
<item>
<key> <string>_body</string> </key>
<value> <string>solver_process = context.Delivery_getSolverProcess()\n
if solver_process is None:\n
return []\n
\n
# XXX should omit \'solved\' decision?\n
return solver_process.SolverProcess_getSolverDecisionList()\n
</string> </value>
......
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