Commit 81b81219 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Klaus Wölfel

AcceptSover: Only applies Solver if it has been defined on the rule

parent e00af2cc
...@@ -50,6 +50,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin): ...@@ -50,6 +50,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
portal = self.getPortalObject() portal = self.getPortalObject()
solved_property_list = self.getConfigurationPropertyDict() \ solved_property_list = self.getConfigurationPropertyDict() \
.get('tested_property_list') .get('tested_property_list')
solver_portal_type_relative_url = self.getPortalTypeValue().getRelativeUrl()
if solved_property_list is None: if solved_property_list is None:
solved_property_list = \ solved_property_list = \
portal.portal_types.getTypeInfo(self).getTestedPropertyList() portal.portal_types.getTypeInfo(self).getTestedPropertyList()
...@@ -60,7 +61,11 @@ class AcceptSolver(ConfigurablePropertySolverMixin): ...@@ -60,7 +61,11 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
divergence_list = movement.getDivergenceList() divergence_list = movement.getDivergenceList()
for divergence in divergence_list: for divergence in divergence_list:
solved_property = divergence.getProperty('tested_property') solved_property = divergence.getProperty('tested_property')
if solved_property not in solved_property_list: # Only apply solver if it has been defined on the Tester
if (solved_property not in solved_property_list) or\
(not solver_portal_type_relative_url\
in portal.restrictedTraverse(
divergence.getProperty('tester_relative_url')).getSolverList()):
continue continue
new_value = divergence.getProperty('decision_value') new_value = divergence.getProperty('decision_value')
# XXX hard coded # XXX hard coded
......
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