Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 4304:df7a4400c2ce
Fix linking of an existing item to a newly created item...
...e.g. edit action in web template is name="issue-1@link@msg"
value="msg1" would trigger a traceback about an unbound variable. Add
new regression test for this case.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Mon, 14 Dec 2009 19:43:44 +0000 |
| parents | 9b9ab6109254 |
| children | 8e0d350ce644 |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Fri Dec 11 22:08:23 2009 +0000 +++ b/roundup/cgi/actions.py Mon Dec 14 19:43:44 2009 +0000 @@ -478,9 +478,9 @@ if linkid is None or linkid.startswith('-'): # linking to a new item if isinstance(propdef, hyperdb.Multilink): - props[linkprop] = [newid] + props[linkprop] = [nodeid] else: - props[linkprop] = newid + props[linkprop] = nodeid else: # linking to an existing item if isinstance(propdef, hyperdb.Multilink): @@ -488,7 +488,7 @@ existing.append(nodeid) props[linkprop] = existing else: - props[linkprop] = newid + props[linkprop] = nodeid return '<br>'.join(m)
