Commit 08d3cc40 authored by Jérome Perrin's avatar Jérome Perrin

predicate.test should not fail if asPredicate returns None

parent 7a4777f5
......@@ -99,6 +99,11 @@ class Predicate(XMLObject):
are strictly a member of tested categories
"""
self = self.asPredicate()
if self is None:
# asPredicate returned None, so this predicate never applies.
# But if we reach this it is because catalog is not up to date.
return False
result = 1
if getattr(aq_base(self), '_identity_criterion', None) is None:
self._identity_criterion = PersistentMapping()
......
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