use object_provides instead of portal_type to query the catalog for comments. this fixes bug #2010085;

svn path=/plone.app.discussion/trunk/; revision=32538
This commit is contained in:
Timo Stollenwerk
2009-12-19 15:03:12 +00:00
parent 2e004456f5
commit adb0390227
2 changed files with 28 additions and 1 deletions
+3 -1
View File
@@ -9,6 +9,8 @@ from Products.CMFPlone import PloneMessageFactory as _
from Products.statusmessages.interfaces import IStatusMessage
from plone.app.discussion.interfaces import IComment
class View(BrowserView):
"""Moderation View
"""
@@ -28,7 +30,7 @@ class View(BrowserView):
catalog = getToolByName(context, 'portal_catalog')
self.comments = catalog(portal_type='Discussion Item',
self.comments = catalog(object_provides=IComment.__identifier__,
review_state='pending',
sort_on='created',
sort_order='reverse')