Commit e880893b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support new style divergence tester whose explain() returns a single value.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31070 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 56d05f57
...@@ -216,7 +216,10 @@ class Rule(Predicate, XMLObject): ...@@ -216,7 +216,10 @@ class Rule(Predicate, XMLObject):
for divergence_tester in self.contentValues( for divergence_tester in self.contentValues(
portal_type=self.getPortalDivergenceTesterTypeList()): portal_type=self.getPortalDivergenceTesterTypeList()):
result = divergence_tester.explain(sim_mvt) result = divergence_tester.explain(sim_mvt)
result_list.extend(result) if isinstance(result, (list, tuple)): # for compatibility
result_list.extend(result)
elif result is not None:
result_list.append(result)
return result_list return result_list
# XXX getSolverList is not part of the API and should be removed. # XXX getSolverList is not part of the API and should be removed.
......
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