Commit 7d762cbd authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

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

parent f49dbf9c
......@@ -48,12 +48,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
original one recorded.
"""
portal = self.getPortalObject()
solved_property_list = self.getConfigurationPropertyDict() \
.get('tested_property_list')
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):
for simulation_movement in self.getDeliveryValueList():
movement = simulation_movement.getDeliveryValue()
......@@ -62,8 +57,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
for divergence in divergence_list:
solved_property = divergence.getProperty('tested_property')
# 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\
if (not solver_portal_type_relative_url\
in portal.restrictedTraverse(
divergence.getProperty('tester_relative_url')).getSolverList()):
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