From 353a66f44c4d1361fd26f581aff2abf7541bf00b Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 7 Dec 2012 10:58:43 -0600 Subject: [PATCH] fixed issue 1207, IS_IN_SET(list_of_ints), thanks Alan --- VERSION | 2 +- gluon/html.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 5aee8290..d3d509cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-06 23:03:48) rc1 +Version 2.3.0 (2012-12-07 10:57:44) rc1 diff --git a/gluon/html.py b/gluon/html.py index 91f9c259..1d6337a8 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -1897,7 +1897,8 @@ class SELECT(INPUT): if not value is None: if not self['_multiple']: for c in options: # my patch - if value and str(c['_value']) == str(value): + if ((value is not None) and + (str(c['_value']) == str(value))): c['_selected'] = 'selected' else: c['_selected'] = None @@ -1907,7 +1908,8 @@ class SELECT(INPUT): else: values = [str(value)] for c in options: # my patch - if value and str(c['_value']) in values: + if ((value is not None) and + (str(c['_value']) in values)): c['_selected'] = 'selected' else: c['_selected'] = None