summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a208fb)
raw | patch | inline | side by side (parent: 7a208fb)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 15 Jan 2003 11:14:01 +0000 (11:14 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 15 Jan 2003 11:14:01 +0000 (11:14 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1458 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/client.py | patch | blob | history | |
test/test_cgi.py | patch | blob | history |
diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 4affd222278ab89f364949d840cea79b3af270a6..a56ea56a621ce8e45e70e2a5bf2326e0e452dafe 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.69 2003-01-15 11:07:45 richard Exp $
+# $Id: client.py,v 1.70 2003-01-15 11:14:01 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
props = {}
keys = form.keys()
properties = cl.getprops()
- existing_cache = {}
for key in keys:
# see if we're performing a special multilink action
mlaction = 'set'
# we're modifying the list - get the current list of ids
if props.has_key(propname):
existing = props[propname]
- else:
+ elif nodeid:
existing = cl.get(nodeid, propname, [])
+ else:
+ existing = []
# now either remove or add
if mlaction == 'remove':
diff --git a/test/test_cgi.py b/test/test_cgi.py
index 781dbc69e7f1815f7d2b279568f859c3c9749c45..f56224592927ef29d49def0868fd9ca98d08082a 100644 (file)
--- a/test/test_cgi.py
+++ b/test/test_cgi.py
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test_cgi.py,v 1.3 2003-01-15 11:07:45 richard Exp $
+# $Id: test_cgi.py,v 1.4 2003-01-15 11:14:01 richard Exp $
import unittest, os, shutil, errno, sys, difflib, cgi
self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
makeForm({':add:nosy': ['2','3']}), nodeid), {'nosy': ['1','2','3']})
+ def testMultilinkAddNew(self):
+ self.assertEqual(client.parsePropsFromForm(self.db, self.db.issue,
+ makeForm({':add:nosy': ['2','3']})), {'nosy': ['2','3']})
+
def testMultilinkRemove(self):
nodeid = self.db.issue.create(nosy=['1','2'])
# do nothing