Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 1737:2c26b6cec950
timelog editing via csv interface crashes [SF#699837]
this needs a better approach :)
we've needed a generic string-to-hyperdb-type converter since day one...
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 12 Aug 2003 01:26:08 +0000 |
| parents | 778056dc420f |
| children | 2223e184f9d2 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Tue Aug 12 01:14:11 2003 +0000 +++ b/roundup/cgi/client.py Tue Aug 12 01:26:08 2003 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.128 2003-08-10 13:38:43 jlgijsbers Exp $ +# $Id: client.py,v 1.129 2003-08-12 01:26:08 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -1272,6 +1272,16 @@ # if it's a multilink, split it if isinstance(prop, hyperdb.Multilink): value = value.split(':') + elif isinstance(prop, hyperdb.Password): + value = password.Password(value) + elif isinstance(prop, hyperdb.Interval): + value = date.Interval(value) + elif isinstance(prop, hyperdb.Date): + value = date.Date(value) + elif isinstance(prop, hyperdb.Boolean): + value = value.lower() in ('yes', 'true', 'on', '1') + elif isinstance(prop, hyperdb.Number): + value = float(value) d[name] = value elif exists: # nuke the existing value
