Skip to content

Commit d1d8719

Browse files
committed
Fix copy_url to properly support properties that are mutlilinks.
1 parent 05a2af3 commit d1d8719

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGES.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Fixed:
2424
roundup/__init__.py. (Thomas Arendsen Hein)
2525
- Do not throw an internal error if a .mo file can not be read
2626
(Thomas Arendsen Hein)
27-
27+
- Make the "Make a copy" link work by fixing copy_url to properly
28+
handle multilink properties. (John Rouillard)
2829

2930
2013-07-06: 1.5.0
3031

roundup/cgi/templating.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,12 @@ def copy_url(self, exclude=("messages", "files")):
11591159
}
11601160
for name in self._props.keys():
11611161
if name not in exclude:
1162-
query[name] = self[name].plain()
1162+
prop = self._props[name]
1163+
if not isinstance(prop, hyperdb.Multilink):
1164+
query[name] = self[name].plain()
1165+
else:
1166+
query[name] = ",".join(self._klass.get(self._nodeid, name))
1167+
11631168
return self._classname + "?" + "&".join(
11641169
["%s=%s" % (key, urllib.quote(value))
11651170
for key, value in query.items()])

0 commit comments

Comments
 (0)