From d178db5153cd72cb36bf4487a2bf08de741743ad Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida <leonardo@nexedi.com> Date: Wed, 21 Oct 2009 15:05:43 +0000 Subject: [PATCH] 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 --- product/ERP5Catalog/CatalogTool.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py index 54be673b3e..597e782435 100644 --- a/product/ERP5Catalog/CatalogTool.py +++ b/product/ERP5Catalog/CatalogTool.py @@ -96,6 +96,17 @@ def getSecurityProduct(acl_users): 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): # We need to update the uid during the cataloging process if name == 'uid': -- 2.30.9