changeset 4839:c317147fd891

Fix copy_url to properly support properties that are mutlilinks.
author John Rouillard <rouilj@ieee.org>
date Mon, 07 Oct 2013 19:29:33 -0400
parents 6102252d3a8a
children 19f2c01d2b9d
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Wed Oct 02 15:36:34 2013 +0200
+++ b/CHANGES.txt	Mon Oct 07 19:29:33 2013 -0400
@@ -24,7 +24,8 @@
   roundup/__init__.py. (Thomas Arendsen Hein)
 - Do not throw an internal error if a .mo file can not be read
   (Thomas Arendsen Hein)
-
+- Make the "Make a copy" link work by fixing copy_url to properly
+  handle multilink properties. (John Rouillard)
 
 2013-07-06: 1.5.0
 
--- a/roundup/cgi/templating.py	Wed Oct 02 15:36:34 2013 +0200
+++ b/roundup/cgi/templating.py	Mon Oct 07 19:29:33 2013 -0400
@@ -1159,7 +1159,12 @@
         }
         for name in self._props.keys():
             if name not in exclude:
-                query[name] = self[name].plain()
+                prop = self._props[name]
+                if not isinstance(prop, hyperdb.Multilink):
+                    query[name] = self[name].plain()
+                else:
+                    query[name] = ",".join(self._klass.get(self._nodeid, name))
+
         return self._classname + "?" + "&".join(
             ["%s=%s" % (key, urllib.quote(value))
                 for key, value in query.items()])

Roundup Issue Tracker: http://roundup-tracker.org/