Skip to content

Commit

Permalink
fixed issue 1411, list of vars when using radiowidget, thanks Dmitry …
Browse files Browse the repository at this point in the history
…Mosin
  • Loading branch information
mdipierro committed Mar 28, 2013
1 parent 515e284 commit bf5fbd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Version 2.4.5-stable+timestamp.2013.03.28.14.43.50
Version 2.4.5-stable+timestamp.2013.03.28.14.45.53
6 changes: 6 additions & 0 deletions gluon/sqlhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ def widget(cls, field, value, **attributes):
see also: :meth:`FormWidget.widget`
"""

if isinstance(value, (list,tuple)):
value = str(value[0])
else:
value = str(value)


attr = cls._attributes(field, {}, **attributes)
attr['_class'] = attr.get('_class', 'web2py_radiowidget')

Expand Down

0 comments on commit bf5fbd8

Please sign in to comment.