Make the IContentish removal logic reusable

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30691 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 34e52cbd
......@@ -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
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):
"""
......
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