fixed issue 1207, IS_IN_SET(list_of_ints), thanks Alan

This commit is contained in:
mdipierro
2012-12-07 10:58:43 -06:00
parent 689dfcd83e
commit 353a66f44c
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.3.0 (2012-12-06 23:03:48) rc1
Version 2.3.0 (2012-12-07 10:57:44) rc1
+4 -2
View File
@@ -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