From 9146aa8025215566e558097ee803aaf76b3b3598 Mon Sep 17 00:00:00 2001 From: Patrick Gerken Date: Wed, 22 Aug 2012 17:58:07 +0200 Subject: [PATCH] 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 --- plone/app/discussion/browser/moderation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index c0e0985..91e3290 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -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")