Stop quickly _getOb uses of asComposedDocument() result

In predicate searches using asComposedDocument() result as context, categories where being looked up as subobjects, triggering the _folder_handler assertion.
Make sure it fails the lookup fast.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45049 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9b03b0e
......@@ -144,7 +144,10 @@ class asComposedDocument(object):
@property
def _folder_handler(self):
assert False
assert False, "Attempt to use .asComposedDocument() result as folder. This should never happen!"
def _getOb(self, key, *args, **kw):
raise KeyError(key)
def __getattr__(self, name):
raise AttributeError(name)
......
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