Commit c2a5926b authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

AcceptSolver: Applies Solver if and only if defined on the tester

parent 163a5c82
...@@ -47,12 +47,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin): ...@@ -47,12 +47,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
original one recorded. original one recorded.
""" """
portal = self.getPortalObject() portal = self.getPortalObject()
solved_property_list = self.getConfigurationPropertyDict() \
.get('tested_property_list')
solver_portal_type_relative_url = self.getPortalTypeValue().getRelativeUrl() solver_portal_type_relative_url = self.getPortalTypeValue().getRelativeUrl()
if solved_property_list is None:
solved_property_list = \
portal.portal_types.getTypeInfo(self).getTestedPropertyList()
with self.defaultActivateParameterDict(activate_kw, True): with self.defaultActivateParameterDict(activate_kw, True):
for simulation_movement in self.getDeliveryValueList(): for simulation_movement in self.getDeliveryValueList():
movement = simulation_movement.getDeliveryValue() movement = simulation_movement.getDeliveryValue()
...@@ -61,8 +56,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin): ...@@ -61,8 +56,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
for divergence in divergence_list: for divergence in divergence_list:
solved_property = divergence.getProperty('tested_property') solved_property = divergence.getProperty('tested_property')
# Only apply solver if it has been defined on the Tester # Only apply solver if it has been defined on the Tester
if (solved_property not in solved_property_list) or\ if (not solver_portal_type_relative_url\
(not solver_portal_type_relative_url\
in portal.restrictedTraverse( in portal.restrictedTraverse(
divergence.getProperty('tester_relative_url')).getSolverList()): divergence.getProperty('tester_relative_url')).getSolverList()):
continue continue
......
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