fix CommentViewlet has_replies method.

svn path=/plone.app.discussion/trunk/; revision=33282
This commit is contained in:
Timo Stollenwerk
2010-01-22 19:02:41 +00:00
parent b1e4b2254c
commit 1e58aa63b1
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -218,8 +218,12 @@ class CommentsViewlet(ViewletBase, layout.FormWrapper):
"""Returns true if there are replies.
"""
if self.get_replies(workflow_actions):
self.get_replies(workflow_actions).next()
return True
try:
self.get_replies(workflow_actions).next()
return True
except StopIteration:
pass
return False
def get_replies(self, workflow_actions=False):
"""Returns all replies to a content object.