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:
parent
58b4205f38
commit
9146aa8025
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user