should not override potential explicit widget tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 12 May 2009 11:49:30 +0200
branchtls-sprint
changeset 1738 2cfd50c8a415
parent 1737 53af44f1b649
child 1739 78b0819162a8
should not override potential explicit widget
web/formfields.py
--- a/web/formfields.py	Tue May 12 11:49:12 2009 +0200
+++ b/web/formfields.py	Tue May 12 11:49:30 2009 +0200
@@ -388,7 +388,8 @@
 
     @staticmethod
     def fromcardinality(card, **kwargs):
-        return RelationField(widget=Select(multiple=card in '*+'), **kwargs)
+        kwargs.setdefault('widget', Select(multiple=card in '*+'))
+        return RelationField(**kwargs)
 
     def vocabulary(self, form):
         entity = form.edited_entity