Mercurial > p > roundup > code
diff roundup/hyperdb.py @ 2333:30b6470d89be maint-0.7
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 | 4d112730e02f |
line wrap: on
line diff
--- a/roundup/hyperdb.py Sun May 16 23:44:32 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.97.2.1 2004-05-18 21:50:30 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:
