# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1236797572 -3600 # Node ID 3bc7d4ebb543a3ddaca5b49eb867c9e9c1060e28 # Parent 84bc7dce187638766aac0b8bb8f4530d9a573e52 if choices is None, call form_field_vocabulary diff -r 84bc7dce1876 -r 3bc7d4ebb543 web/form.py --- a/web/form.py Wed Mar 11 19:51:50 2009 +0100 +++ b/web/form.py Wed Mar 11 19:52:52 2009 +0100 @@ -488,7 +488,7 @@ self.label = label or name self.id = id or name self.initial = initial - self.choices = choices or () + self.choices = choices self.help = help self.eidparam = eidparam self.role = 'subject' @@ -537,7 +537,9 @@ return self.get_widget(form).render(form, self) def vocabulary(self, form): - return self.choices + if self.choices is not None: + return self.choices + return form.form_field_vocabulary(self) class StringField(Field):