Commit ed3d06f9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

rewrite SolverDecision.searchDeliverySolverList() to use target solver portal...

rewrite SolverDecision.searchDeliverySolverList() to use target solver portal type's delivery_solver list.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36882 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 978ab5c1
......@@ -118,11 +118,11 @@ class SolverDecision(ConfigurableMixin, XMLObject):
this method returns a list of delivery solvers, as predicates against
solver decision.
"""
portal = self.getPortalObject()
portal_type_list = portal.getPortalDeliverySolverTypeList()
portal_solvers = portal.portal_solvers
return filter(lambda x:x.test(self),
[getattr(portal_solvers, x) for x in portal_type_list])
target_solver_type = self.getSolverValue()
if target_solver_type is None:
return []
solver_list = target_solver_type.getDeliverySolverValueList()
return filter(lambda x:x.test(self), solver_list)
def getExplanationMessage(self, all=False):
"""
......
......@@ -85,4 +85,4 @@ class SolverType:
},
)
_categories = ('conflicting_solver',)
_categories = ('conflicting_solver', 'delivery_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