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') current_state = workflowTool.getInfoFor(comment, 'review_state')
if current_state != 'published': if current_state != 'published':
workflowTool.doActionFor(comment, 'publish') workflowTool.doActionFor(comment, 'publish')
catalogTool = getToolByName(comment, 'portal_catalog') comment.reindexObject()
catalogTool.reindexObject(comment) content_object.reindexObject()
IStatusMessage(self.context.REQUEST).addStatusMessage( IStatusMessage(self.context.REQUEST).addStatusMessage(
_("Comment approved."), _("Comment approved."),
type="info") type="info")