Commit ec38abda authored by Romain Courteaud's avatar Romain Courteaud

erp5_discussion: use the catalog to count

parent 422582f5
......@@ -6,4 +6,4 @@ discussion = context.DiscussionThread_getContextThread()
if discussion == None:
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