[CMF-checkins] CVS: CMF/CMFCore - ActionProviderBase.py:1.13.6.3
Chris McDonough
chrism@zope.com
Wed, 14 Aug 2002 20:35:00 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv25655
Modified Files:
Tag: chrism-actions-branch
ActionProviderBase.py
Log Message:
Dont return None from listActions.
=== CMF/CMFCore/ActionProviderBase.py 1.13.6.2 => 1.13.6.3 ===
--- CMF/CMFCore/ActionProviderBase.py:1.13.6.2 Wed Jul 31 13:19:08 2002
+++ CMF/CMFCore/ActionProviderBase.py Wed Aug 14 20:35:00 2002
@@ -48,7 +48,7 @@
""" Return all the actions defined by a provider.
"""
- return self._actions or None
+ return self._actions or []
#
# ZMI methods
@@ -59,23 +59,21 @@
""" Show the 'Actions' management tab.
"""
actions = []
- if self.listActions() is not None:
+ for a in self.listActions():
- for a in self.listActions():
-
- a1 = a.getActionInfoDict()
- a1['id'] = a.getId()
- a1['name'] = a.Title()
- p = a.getPermissions()
- if p:
- a1['permission'] = p[0]
- else:
- a1['permission'] = ''
- a1['category'] = a.getCategory() or 'object'
- a1['visible'] = a.getVisibility()
- a1['action'] = a.getActionExpression()
- a1['condition'] = a.getCondition()
- actions.append(a1)
+ a1 = a.getActionInfoDict()
+ a1['id'] = a.getId()
+ a1['name'] = a.Title()
+ p = a.getPermissions()
+ if p:
+ a1['permission'] = p[0]
+ else:
+ a1['permission'] = ''
+ a1['category'] = a.getCategory() or 'object'
+ a1['visible'] = a.getVisibility()
+ a1['action'] = a.getActionExpression()
+ a1['condition'] = a.getCondition()
+ actions.append(a1)
# possible_permissions is in AccessControl.Role.RoleManager.
pp = self.possible_permissions()