summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5cfcac7)
raw | patch | inline | side by side (parent: 5cfcac7)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 26 Sep 2002 03:21:03 +0000 (03:21 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 26 Sep 2002 03:21:03 +0000 (03:21 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1255 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/client.py | patch | blob | history |
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 3c3c6e1f48ce4ad719d488093820e5aa29915eb0..620715ad69e8adafffae7a2d2cd9bb1649adb2ba 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.44 2002-09-25 05:27:07 richard Exp $
+# $Id: client.py,v 1.45 2002-09-26 03:21:03 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
elif isinstance(proptype, hyperdb.Link):
# see if it's the "no selection" choice
if value == '-1':
- continue
- # handle key values
- link = proptype.classname
- if not num_re.match(value):
- try:
- value = db.classes[link].lookup(value)
- except KeyError:
- raise ValueError, _('property "%(propname)s": '
- '%(value)s not a %(classname)s')%{'propname':key,
- 'value': value, 'classname': link}
- except TypeError, message:
- raise ValueError, _('you may only enter ID values '
- 'for property "%(propname)s": %(message)s')%{
- 'propname':key, 'message': message}
+ value = None
+ else:
+ # handle key values
+ link = proptype.classname
+ if not num_re.match(value):
+ try:
+ value = db.classes[link].lookup(value)
+ except KeyError:
+ raise ValueError, _('property "%(propname)s": '
+ '%(value)s not a %(classname)s')%{'propname':key,
+ 'value': value, 'classname': link}
+ except TypeError, message:
+ raise ValueError, _('you may only enter ID values '
+ 'for property "%(propname)s": %(message)s')%{
+ 'propname':key, 'message': message}
elif isinstance(proptype, hyperdb.Multilink):
if isinstance(value, type([])):
# it's a list of MiniFieldStorages