From 0c6b873befd02ab38ebb6382e3d44b9b926efeac Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 27 Mar 2013 17:06:14 +0100 Subject: [PATCH] Do not raise an error when no workflow is assigned to the comment type. --- plone/app/discussion/browser/comments.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 7bbd391..e1f4916 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -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(