diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index f79d400..dac227b 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -24,7 +24,7 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit): implements(IComment) - meta_type = portal_type = Type = 'Discussion Item' + meta_type = portal_type = 'Discussion Item' __parent__ = None @@ -75,6 +75,11 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit): """ return self.creator + def Type(self): + """The Discussion Item content type + """ + return "Discussion Item" + # CMF's event handlers assume any IDynamicType has these :( def opaqueItems(self): diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py index 98a2540..e3b00ef 100644 --- a/plone/app/discussion/tests/test_comment.py +++ b/plone/app/discussion/tests/test_comment.py @@ -45,7 +45,7 @@ class CommentTest(PloneTestCase): def test_type(self): comment1 = createObject('plone.Comment') - self.assertEquals(comment1.Type, 'Discussion Item') + self.assertEquals(comment1.Type(), 'Discussion Item') def test_traversal(self): # make sure comments are traversable, have an id, absolute_url and physical path