Override __init__ of our IndexableObjectWrapper to match our expected...

Override __init__ of our IndexableObjectWrapper to match our expected signature instead of the one on CMF 2.2 that changed. (approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29886 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74d8ea63
...@@ -96,6 +96,17 @@ def getSecurityProduct(acl_users): ...@@ -96,6 +96,17 @@ def getSecurityProduct(acl_users):
class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper): class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper):
def __init__(self, vars, ob):
# sigh... CMFCoreIndexableObjectWrapper changed signature between
# CMF 1.5 and 2.x. The new signature is (self, ob, catalog), and the
# 'vars' calculation is done by __init__ itself
# FIXME, we should consider taking a page from the CMFCore parent and
# move the 'vars' logic here. We would be actually making use of the
# 'catalog' parameter, instead of just using it to fetch
# portal_workflow.
self.__vars = vars
self.__ob = ob
def __setattr__(self, name, value): def __setattr__(self, name, value):
# We need to update the uid during the cataloging process # We need to update the uid during the cataloging process
if name == 'uid': if name == 'uid':
......
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