From 05d351cd68ca3d1c0b437165f637281e8379bde3 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 16 Sep 2012 11:43:03 -0500 Subject: [PATCH] fixed issue 1010, error reporting on list:string --- VERSION | 2 +- gluon/contrib/login_methods/oauth20_account.py | 2 +- gluon/html.py | 2 +- gluon/sqlhtml.py | 10 ++++++---- gluon/validators.py | 11 ++++++----- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/VERSION b/VERSION index 3a06cd20..6d164647 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-16 10:43:34) stable +Version 2.0.9 (2012-09-16 11:42:59) stable diff --git a/gluon/contrib/login_methods/oauth20_account.py b/gluon/contrib/login_methods/oauth20_account.py index 8d740499..e3d38321 100644 --- a/gluon/contrib/login_methods/oauth20_account.py +++ b/gluon/contrib/login_methods/oauth20_account.py @@ -107,7 +107,7 @@ server for requests. It can be used for the optional"scope" parameters for Face path_info = next else: path_info = r.env.path_info - uri = '%s://%s%s' %(url_scheme, http_host, path_info) + uri = '%s://%s%s' % (url_scheme, http_host, path_info) if r.get_vars and not next: uri += '?' + urlencode(r.get_vars) return uri diff --git a/gluon/html.py b/gluon/html.py index 0498c0d5..41d8339d 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -1745,7 +1745,7 @@ class INPUT(DIV): elif not t == 'submit': if value is None: self['value'] = _value - else: + elif not isinstance(value,list): self['_value'] = value def xml(self): diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index e40fa534..d9c7928f 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -239,11 +239,13 @@ class ListWidget(StringWidget): _name = field.name if field.type=='list:integer': _class = 'integer' else: _class = 'string' - requires = field.requires if isinstance(field.requires, (IS_NOT_EMPTY, IS_LIST_OF)) else None + requires = field.requires if isinstance( + field.requires, (IS_NOT_EMPTY, IS_LIST_OF)) else None attributes['_style'] = 'list-style:none' - items=[LI(INPUT(_id=_id, _class=_class, _name=_name, - value=v, hideerror=True, requires=requires), - **attributes) for v in value or ['']] + items = [LI(INPUT(_id=_id, _class=_class, _name=_name, + value=v, hideerror=k