Skip to content

Commit a2c2c01

Browse files
author
Richard Jones
committed
[SF#576241] MultiLink problems in parsePropsFromForm
1 parent 0a61eab commit a2c2c01

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
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
. bsddb3 backend should use 'c' for create, not 'n' for nuke
99
. #571170 ] gdbm deadlock
10+
. #576241 ] MultiLink problems in parsePropsFromForm
1011

1112

1213
2002-06-24 0.4.2

roundup/cgi_client.py

Lines changed: 10 additions & 4 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.129 2002-06-20 23:52:11 richard Exp $
18+
# $Id: cgi_client.py,v 1.129.2.1 2002-07-10 06:50:49 richard Exp $
1919

2020
__doc__ = """
2121
WWW request handler (also used in the stand-alone server).
@@ -1338,10 +1338,13 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
13381338
'value': value, 'classname': link}
13391339
elif isinstance(proptype, hyperdb.Multilink):
13401340
value = form[key]
1341-
if type(value) != type([]):
1342-
value = [i.strip() for i in value.value.split(',')]
1341+
if hasattr(value,'value'):
1342+
# Quite likely to be a FormItem instance
1343+
value = value.value
1344+
if not isinstance(value, type([])):
1345+
value = [i.strip() for i in value.split(',')]
13431346
else:
1344-
value = [i.value.strip() for i in value]
1347+
value = [i.strip() for i in value]
13451348
link = cl.properties[key].classname
13461349
l = []
13471350
for entry in map(str, value):
@@ -1375,6 +1378,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
13751378

13761379
#
13771380
# $Log: not supported by cvs2svn $
1381+
# Revision 1.129 2002/06/20 23:52:11 richard
1382+
# Better handling of unauth attempt to edit stuff
1383+
#
13781384
# Revision 1.128 2002/06/12 21:28:25 gmcm
13791385
# Allow form to set user-properties on a Fileclass.
13801386
# Don't assume that a Fileclass is named "files".

0 commit comments

Comments
 (0)