check if the comment is not already published, before publishing.
svn path=/plone.app.discussion/trunk/; revision=27723
This commit is contained in:
parent
7e3de6ae0a
commit
6057ad0e91
@ -147,6 +147,8 @@ class BulkActionsView(BrowserView):
|
||||
for path in self.paths:
|
||||
comment = context.restrictedTraverse(path)
|
||||
portal_workflow = getToolByName(comment, 'portal_workflow')
|
||||
current_state = portal_workflow.getInfoFor(comment, 'review_state')
|
||||
if current_state != 'published':
|
||||
portal_workflow.doActionFor(comment, 'publish')
|
||||
catalog = getToolByName(comment, 'portal_catalog')
|
||||
catalog.reindexObject(comment)
|
||||
|
Loading…
Reference in New Issue
Block a user