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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user