From 06c12403ab3b3bec92ebe76127e1d8ba383dd6a9 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 10 Jul 2002 06:51:08 +0000 Subject: [PATCH] . #576241 ] MultiLink problems in parsePropsFromForm git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@862 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/cgi_client.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4669134..e751d80 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ Fixed: . installation instructions now mention "python2" in "testing your python". . made the unit tests run again - they were quite b0rken . #571170 ] gdbm deadlock + . #576241 ] MultiLink problems in parsePropsFromForm Feature: . cleaned up the indexer code: diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index b284f49..4094637 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.135 2002-07-10 00:22:34 richard Exp $ +# $Id: cgi_client.py,v 1.136 2002-07-10 06:51:08 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -1454,10 +1454,13 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')): 'value': value, 'classname': link} elif isinstance(proptype, hyperdb.Multilink): value = form[key] - if type(value) != type([]): + if hasattr(value, 'value'): + # Quite likely to be a FormItem instance + value = value.value + if not isinstance(value, type([])): value = [i.strip() for i in value.value.split(',')] else: - value = [i.value.strip() for i in value] + value = [i.strip() for i in value] link = cl.properties[key].classname l = [] for entry in map(str, value): @@ -1491,6 +1494,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')): # # $Log: not supported by cvs2svn $ +# Revision 1.135 2002/07/10 00:22:34 richard +# . switched to using a session-based web login +# # Revision 1.134 2002/07/09 04:19:09 richard # Added reindex command to roundup-admin. # Fixed reindex on first access. -- 2.30.2