# HG changeset patch # User Sylvain Thénault # Date 1280913400 -7200 # Node ID d7cef08aad2757664291bd7ddad877f69c8541a9 # Parent 3bbc79a39d3acdb3cea1def855617afffd41a008 [cwprops] fix callable vocabulary of cwproperties which were inconsistently called. No more argument, should now simply return a list of (untranslated) values diff -r 3bbc79a39d3a -r d7cef08aad27 cwvreg.py --- a/cwvreg.py Wed Aug 04 11:16:39 2010 +0200 +++ b/cwvreg.py Wed Aug 04 11:16:40 2010 +0200 @@ -713,7 +713,7 @@ vocab = pdef['vocabulary'] if vocab is not None: if callable(vocab): - vocab = vocab(key, None) # XXX need a req object + vocab = vocab(None) # XXX need a req object if not value in vocab: raise ValueError(_('unauthorized value')) return value diff -r 3bbc79a39d3a -r d7cef08aad27 web/views/cwproperties.py --- a/web/views/cwproperties.py Wed Aug 04 11:16:39 2010 +0200 +++ b/web/views/cwproperties.py Wed Aug 04 11:16:40 2010 +0200 @@ -353,7 +353,7 @@ if vocab is not None: if callable(vocab): # list() just in case its a generator function - self.choices = list(vocab(form._cw)) + self.choices = list(vocab()) else: self.choices = vocab wdg = Select()