No need to manually put comments from conversation.getComments in an acquisition chain since getComments now returns acquisition wrapped comments.
svn path=/plone.app.discussion/trunk/; revision=51642
This commit is contained in:
parent
5045960281
commit
3798338549
@ -236,7 +236,7 @@ def notify_content_object_moved(obj, event):
|
|||||||
# Reindex comment at the new location
|
# Reindex comment at the new location
|
||||||
conversation = IConversation(obj)
|
conversation = IConversation(obj)
|
||||||
for comment in conversation.getComments():
|
for comment in conversation.getComments():
|
||||||
comment.__parent__.__parent__.__parent__ = event.newParent
|
aq_base(comment).__parent__.__parent__.__parent__ = event.newParent
|
||||||
catalog.reindexObject(aq_base(comment))
|
catalog.reindexObject(aq_base(comment))
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
from zope.annotation.interfaces import IAnnotations
|
||||||
|
|
||||||
@ -31,9 +31,8 @@ def patchedClearFindAndRebuild(self):
|
|||||||
conversation = conversation.__of__(obj)
|
conversation = conversation.__of__(obj)
|
||||||
for comment in conversation.getComments():
|
for comment in conversation.getComments():
|
||||||
try:
|
try:
|
||||||
comment = comment.__of__(conversation)
|
|
||||||
if catalog:
|
if catalog:
|
||||||
catalog.indexObject(comment)
|
catalog.indexObject(aq_base(comment))
|
||||||
except StopIteration: # pragma: no cover
|
except StopIteration: # pragma: no cover
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user