quick & dirty fix for auto completion widget stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 03 Dec 2009 15:09:28 +0100
branchstable
changeset 3993 8cf7c767b134
parent 3989 8b471739fb33
child 3995 9b52725d8c53
quick & dirty fix for auto completion widget
web/formwidgets.py
--- a/web/formwidgets.py	Thu Dec 03 12:50:31 2009 +0100
+++ b/web/formwidgets.py	Thu Dec 03 15:09:28 2009 +0100
@@ -394,6 +394,8 @@
         init_ajax_attributes(attrs, self.wdgtype, self.loadtype)
         # XXX entity form specific
         attrs['cubicweb:dataurl'] = self._get_url(form.edited_entity, field)
+        if not values:
+            values = ('',)
         return name, values, attrs
 
     def _get_url(self, entity, field):