Commit b519b2be authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix SolverProcess.buildSolverDecisionList().

* argument of getSolverDecisionApplicationValueList() should be a movement instead of a simulation movement.
* list cannot be a part of dict key.
* fix a typo: setdefatuls -> setdefault.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31366 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0a9bf83d
...@@ -176,10 +176,10 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -176,10 +176,10 @@ class SolverProcess(XMLObject, ActiveProcess):
simulation_movemet_url = simulation_movement.getRelativeUrl() simulation_movemet_url = simulation_movement.getRelativeUrl()
for divergence_tester in simulation_movement.getParentValue().getSpecialiseValue()._getDivergenceTesterList(): for divergence_tester in simulation_movement.getParentValue().getSpecialiseValue()._getDivergenceTesterList():
application_list = map(lambda x:x.getRelativeUrl(), application_list = map(lambda x:x.getRelativeUrl(),
self.getSolverDecisionApplicationValueList(simulation_movement, divergence_tester)) self.getSolverDecisionApplicationValueList(movement, divergence_tester))
application_list.sort() application_list.sort()
solver_decision_key = (divergence_tester.getRelativeUrl(), application_list) solver_decision_key = (divergence_tester.getRelativeUrl(), tuple(application_list))
movement_dict = solver_decision_dict.setdefaults(solver_decision_key, {}) movement_dict = solver_decision_dict.setdefault(solver_decision_key, {})
movement_dict[simulation_movemet_url] = None movement_dict[simulation_movemet_url] = None
# Now build the solver decision instances based on the previous # Now build the solver decision instances based on the previous
......
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