Skip to content

Commit 4579f26

Browse files
author
Richard Jones
committed
[SF#576241] MultiLink problems in parsePropsFromForm
1 parent 3fa8a2b commit 4579f26

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Fixed:
77
. installation instructions now mention "python2" in "testing your python".
88
. made the unit tests run again - they were quite b0rken
99
. #571170 ] gdbm deadlock
10+
. #576241 ] MultiLink problems in parsePropsFromForm
1011

1112
Feature:
1213
. cleaned up the indexer code:

roundup/cgi_client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.135 2002-07-10 00:22:34 richard Exp $
18+
# $Id: cgi_client.py,v 1.136 2002-07-10 06:51:08 richard Exp $
1919

2020
__doc__ = """
2121
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+$')):
14541454
'value': value, 'classname': link}
14551455
elif isinstance(proptype, hyperdb.Multilink):
14561456
value = form[key]
1457-
if type(value) != type([]):
1457+
if hasattr(value, 'value'):
1458+
# Quite likely to be a FormItem instance
1459+
value = value.value
1460+
if not isinstance(value, type([])):
14581461
value = [i.strip() for i in value.value.split(',')]
14591462
else:
1460-
value = [i.value.strip() for i in value]
1463+
value = [i.strip() for i in value]
14611464
link = cl.properties[key].classname
14621465
l = []
14631466
for entry in map(str, value):
@@ -1491,6 +1494,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')):
14911494

14921495
#
14931496
# $Log: not supported by cvs2svn $
1497+
# Revision 1.135 2002/07/10 00:22:34 richard
1498+
# . switched to using a session-based web login
1499+
#
14941500
# Revision 1.134 2002/07/09 04:19:09 richard
14951501
# Added reindex command to roundup-admin.
14961502
# Fixed reindex on first access.

0 commit comments

Comments
 (0)