Commit f581f7ee authored by Romain Courteaud's avatar Romain Courteaud

erp5_discussion: use the catalog to count

parent 70858698
...@@ -6,4 +6,4 @@ discussion = context.DiscussionThread_getContextThread() ...@@ -6,4 +6,4 @@ discussion = context.DiscussionThread_getContextThread()
if discussion == None: if discussion == None:
return 0 return 0
return len(discussion.searchFolder(portal_type='Discussion Post')) return discussion.countFolder(portal_type='Discussion Post')[0][0]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment