Do not raise an error when no workflow is assigned to the comment type.
This commit is contained in:
parent
317bbca6d8
commit
0c6b873bef
@ -233,7 +233,11 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
||||
can_review = getSecurityManager().checkPermission('Review comments',
|
||||
context)
|
||||
workflowTool = getToolByName(context, 'portal_workflow')
|
||||
comment_review_state = workflowTool.getInfoFor(comment, 'review_state')
|
||||
comment_review_state = workflowTool.getInfoFor(
|
||||
comment,
|
||||
'review_state',
|
||||
None
|
||||
)
|
||||
if comment_review_state == 'pending' and not can_review:
|
||||
# Show info message when comment moderation is enabled
|
||||
IStatusMessage(self.context.REQUEST).addStatusMessage(
|
||||
|
Loading…
Reference in New Issue
Block a user