Code

timelog editing via csv interface crashes (sf bug 699837)
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 12 Aug 2003 01:26:08 +0000 (01:26 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 12 Aug 2003 01:26:08 +0000 (01:26 +0000)
this needs a better approach :)
we've needed a generic string-to-hyperdb-type converter since day one...

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1805 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/cgi/client.py

index 96595286fc00198728173cd9a92d0b6d985f49ae..8e7299ae9ce056348c9afc8c364305d6b29dbc77 100644 (file)
@@ -6,6 +6,8 @@ are given with the most recent entry first.
 - Query editing now works correctly (sf bug 621248)
 - roundup-server now logs IP addresses by default (sf bug 778795)
 - logfile must be specified if pidfile is (sf bug 772820)
+- timelog editing via csv interface crashes (sf bug 699837)
+
 
 2003-07-29 0.6.0b4
 - plugged cross-site-scripting hole (thanks Jeff Epler)
index 097a48d3e1007552b572ae2abd75ef8d88183c82..684d8c595c140110d5991e113724bfdc97b2f2fb 100644 (file)
@@ -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 @@ You should then receive another email with the new password.
                     # 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