From 036bd2792c0d3dce515d33bc228eb6f6da0c4ac7 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida <leonardo@nexedi.com> Date: Tue, 17 Nov 2009 14:35:33 +0000 Subject: [PATCH] Make the IContentish removal logic reusable git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30691 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 688dd9673c..b35da060fc 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -3734,12 +3734,16 @@ except ImportError: # We're on CMF 1.5 where the IContentish is not yet bridged as a Zope3 # interface, so no need to worry about events here. Remove this "try:" once # we abandon Zope 2.8 - pass + def removeIContentishInterface(cls): + pass else: # suppress CMFCore event machinery from trying to reindex us through events # by removing Products.CMFCore.interfaces.IContentish interface. # We reindex ourselves in manage_afterAdd thank you very much. - classImplementsOnly(Base, implementedBy(Base) - IContentish) + def removeIContentishInterface(cls): + classImplementsOnly(cls, implementedBy(cls) - IContentish) + +removeIContentishInterface(Base) class TempBase(Base): """ -- 2.30.9