diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 53f1be2..7bf1d36 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -236,7 +236,7 @@ def notify_content_object_moved(obj, event): # Reindex comment at the new location conversation = IConversation(obj) for comment in conversation.getComments(): - comment.__parent__.__parent__.__parent__ = event.newParent + aq_base(comment).__parent__.__parent__.__parent__ = event.newParent catalog.reindexObject(aq_base(comment)) diff --git a/plone/app/discussion/patches.py b/plone/app/discussion/patches.py index bd32e4a..1c591c6 100644 --- a/plone/app/discussion/patches.py +++ b/plone/app/discussion/patches.py @@ -1,4 +1,4 @@ -from Acquisition import aq_inner, aq_parent +from Acquisition import aq_inner, aq_base, aq_parent from zope.annotation.interfaces import IAnnotations @@ -31,9 +31,8 @@ def patchedClearFindAndRebuild(self): conversation = conversation.__of__(obj) for comment in conversation.getComments(): try: - comment = comment.__of__(conversation) if catalog: - catalog.indexObject(comment) + catalog.indexObject(aq_base(comment)) except StopIteration: # pragma: no cover pass