fixed #662654: As an administrator, I can configure a Collection to show
recent comments. Type now correctly returns FTI type title. A catalog rebuild is necessary. svn path=/plone.app.discussion/trunk/; revision=35266
This commit is contained in:
@@ -113,7 +113,8 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
|
||||
def Type(self):
|
||||
"""The Discussion Item content type
|
||||
"""
|
||||
return self.portal_type
|
||||
ptypes = getToolByName(self, 'portal_types')
|
||||
return ptypes[self.portal_type].title
|
||||
|
||||
# CMF's event handlers assume any IDynamicType has these :(
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ class CommentCatalogTest(PloneTestCase):
|
||||
def test_type(self):
|
||||
self.assertEquals(self.comment_brain.portal_type, 'Discussion Item')
|
||||
self.assertEquals(self.comment_brain.meta_type, 'Discussion Item')
|
||||
self.assertEquals(self.comment_brain.Type, 'Discussion Item')
|
||||
self.assertEquals(self.comment_brain.Type, 'Comment')
|
||||
|
||||
def test_review_state(self):
|
||||
self.assertEquals(self.comment_brain.review_state, 'published')
|
||||
|
||||
Reference in New Issue
Block a user