Don't use reindexObject from catalog, but from the object

collective.indexing assumes that reindexObject from catalog is not
an official api method, therefor it does not patch it.
This results in missing updates if plone.app.discussion is used
together with solr, which uses collective.indexing
This commit is contained in:
Patrick Gerken 2012-08-22 17:58:07 +02:00
parent 58b4205f38
commit 9146aa8025

View File

@ -133,8 +133,8 @@ class PublishComment(BrowserView):
current_state = workflowTool.getInfoFor(comment, 'review_state')
if current_state != 'published':
workflowTool.doActionFor(comment, 'publish')
catalogTool = getToolByName(comment, 'portal_catalog')
catalogTool.reindexObject(comment)
comment.reindexObject()
content_object.reindexObject()
IStatusMessage(self.context.REQUEST).addStatusMessage(
_("Comment approved."),
type="info")