From c9a507068153ff0a828b8ac00b6fc6e71e37f438 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 17 Oct 2009 16:29:45 +0000 Subject: [PATCH] Adding Persistent to subclasses of comment - this fixes five.intid choking on Comments in the catalog on reinstall. evilbungle branch merge. svn path=/plone.app.discussion/trunk/; revision=30670 --- plone/app/discussion/comment.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 8d78a8b..7a39a8c 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -5,13 +5,17 @@ from zope.interface import implements from zope.component.factory import Factory from Acquisition import aq_parent, Implicit -from OFS.Traversable import Traversable from AccessControl.Role import RoleManager from AccessControl.Owned import Owned -from plone.app.discussion.interfaces import IComment +from Globals import Persistent from Products.CMFCore.DynamicType import DynamicType +from Products.CMFCore.utils import getToolByName + +from OFS.Traversable import Traversable + +from plone.app.discussion.interfaces import IComment try: # Plone 4: @@ -25,10 +29,9 @@ except: from OFS.Traversable import Traversable as CatalogAware from OFS.Traversable import Traversable as WorkflowAware -from Products.CMFCore.utils import getToolByName -class Comment(CatalogAware, WorkflowAware, DynamicType, - Traversable, RoleManager, Owned, Implicit): +class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable, + RoleManager, Owned, Implicit, Persistent): """A comment. This object attempts to be as lightweight as possible. We implement a