Commit 22126c7b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

copy test() from existing Document/Rule.py that is also required in new API rules.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31319 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d742e8df
......@@ -84,6 +84,14 @@ class RuleMixin:
activate_kw=activate_kw)
return context.get(id)
def test(self, *args, **kw):
"""
If no test method is defined, return False, to prevent infinite loop
"""
if not self.getTestMethodId():
return False
return Predicate.test(self, *args, **kw)
def expand(self, applied_rule, **kw):
"""
Expand this applied rule to create new documents inside the
......
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