Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 3852:0dd05c9e5fff
New test for linking of non-existing and existing properties via a form.
The idea of the test is to track all create and set operations and
afterwards compare that they occurred as expected. Sorry for the
peculiar syntax for the expected updates to the database -- this should
be one line for each update...
An a bug-fix: I've reverted a change from April in
roundup/cgi/actions.py that broke linking of messages to issues. The
tests above now catch that. I couldn't figure out what the change was
meant for, sorry if I broke something here.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Tue, 08 May 2007 20:54:56 +0000 |
| parents | 5fe1f30f7f30 |
| children | d1eb694edcc7 |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Mon May 07 14:03:30 2007 +0000 +++ b/roundup/cgi/actions.py Tue May 08 20:54:56 2007 +0000 @@ -1,6 +1,7 @@ -#$Id: actions.py,v 1.67 2007-05-07 14:03:30 schlatterbeck Exp $ +#$Id: actions.py,v 1.68 2007-05-08 20:54:56 schlatterbeck Exp $ import re, cgi, StringIO, urllib, Cookie, time, random, csv, codecs +import sys from roundup import hyperdb, token, date, password from roundup.i18n import _ @@ -371,12 +372,10 @@ # link item to link to doesn't (and won't) exist continue - for vcn, vid in vlist: - if vid == '-1': vid = None - if not (vid or all_props.has_key((vcn, vid))): + for value in vlist: + if not all_props.has_key(value): # link item to link to doesn't (and won't) exist continue - value = (vcn, vid) deps.setdefault((cn, nodeid), []).append(value) links.setdefault(value, []).append((cn, nodeid, propname))
