vocabfunc must be compliant with StaticVocabularyConstraint.vocabulary which takes only keyword parameters
--- a/web/views/management.py Wed Apr 08 11:04:47 2009 +0200
+++ b/web/views/management.py Fri Apr 10 11:32:32 2009 +0200
@@ -159,9 +159,11 @@
w(u'<tr><th>%s</th><th>%s</th><th>%s</th><th> </th></tr>\n'
% (_("name"), _("label"), _('granted to groups')))
if getattr(entity, '__permissions__', None):
+ # vocabfunc must be compliant with StaticVocabularyConstraint.vocabulary
+ # which takes only keyword parameters
wdg = StaticComboBoxWidget(self.vreg, self.schema['EPermission'],
self.schema['name'], self.schema['String'],
- vocabfunc=lambda x: entity.__permissions__)
+ vocabfunc=lambda entity, x=entity: x.__permissions__)
else:
wdg = newperm.get_widget('name')
w(u'<tr><td>%s</td>\n' % wdg.edit_render(newperm))