Code

. #576241 ] MultiLink problems in parsePropsFromForm
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 10 Jul 2002 06:51:08 +0000 (06:51 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 10 Jul 2002 06:51:08 +0000 (06:51 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@862 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/cgi_client.py

index 466913438a0fd8e959f9a52660471346ee4187bb..e751d803ba44d5463c43dece329cc9a1778b6e1d 100644 (file)
@@ -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:
index b284f499bc996b4947952b898df0085109ec4512..40946374b2167b610d7e9ceb47edf4f01fde0f72 100644 (file)
@@ -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.