[Zope-CMF] ActionsTool bug on CMFCore trunk

Brent Hendricks brent.hendricks at gmail.com
Sun Nov 6 00:03:41 EST 2005


I believe I have discovered a bug in CMFCore/ActionsTool.py on the
trunk.  The implementation of getActionObject() which it inherits from
ActionProviderBase seems to be expecting self.listActions() to return
ActionInformation objects since it calls getCategory() on them.  But
newly created instances now have Action objects instead which have no
such method.

This test case illustrates the bug:

    def test_getActionObject(self):
        tool = self.tool
        tool.manage_addProduct['CMFCore'].manage_addActionCategory('category')
        tool.category.manage_addProduct['CMFCore'].manage_addAction('bar')
        action = tool.getActionObject('category/bar')
        self.assertEquals(action.getId(), 'bar')

I've attached a patch that I believe fixes it

Brent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ActionsTool.patch
Type: text/x-patch
Size: 1150 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20051105/3db2479a/ActionsTool.bin


More information about the Zope-CMF mailing list