diff roundup/hyperdb.py @ 2334:c5e5e9e176d2

add "checked" to truth values for Boolean input
author Richard Jones <richard@users.sourceforge.net>
date Tue, 18 May 2004 21:53:18 +0000
parents ac4f295499a4
children 682eefe8ef23
line wrap: on
line diff
--- a/roundup/hyperdb.py	Tue May 18 19:46:35 2004 +0000
+++ b/roundup/hyperdb.py	Tue May 18 21:53:18 2004 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: hyperdb.py,v 1.97 2004-05-02 23:16:05 richard Exp $
+# $Id: hyperdb.py,v 1.98 2004-05-18 21:53:18 richard Exp $
 
 """Hyperdatabase implementation, especially field types.
 """
@@ -743,7 +743,8 @@
         value = [str(x) for x in value]
     elif isinstance(proptype, Boolean):
         value = value.strip()
-        value = value.lower() in ('yes', 'true', 'on', '1')
+        # checked is a common HTML checkbox value
+        value = value.lower() in ('checked', 'yes', 'true', 'on', '1')
     elif isinstance(proptype, Number):
         value = value.strip()
         try:

Roundup Issue Tracker: http://roundup-tracker.org/