From 535af3aaceedbf99b52fbe737b341cb22d813dbf Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Fri, 5 Dec 2014 02:09:46 +0100 Subject: [PATCH] Count acquisition wrapped comments If the View permission is not set directly on the workflow, but instead is left to be acquired, total_comments will always return 0. --- plone/app/discussion/conversation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index 540bf97..e73546a 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -80,7 +80,7 @@ class Conversation(Traversable, Persistent, Explicit): @property def total_comments(self): public_comments = [ - x for x in self._comments.values() + x for x in self.values() if user_nobody.has_permission('View', x) ] return len(public_comments)