minor correction in links for horizontal and vertical shape
authorrougeronj
Tue, 27 Jan 2015 11:20:16 +0100
changeset 434 c73bf54da095
parent 433 bffe8dfa3a7f
child 435 0116feeb4fa3
minor correction in links for horizontal and vertical shape
src/hdalab/views/profile.py
--- a/src/hdalab/views/profile.py	Mon Jan 26 17:25:40 2015 +0100
+++ b/src/hdalab/views/profile.py	Tue Jan 27 11:20:16 2015 +0100
@@ -162,6 +162,10 @@
             switch_shape_url["horiz"] = current_url.replace("&shape=vert", "&shape=horiz")
             switch_shape_url["circle"] = current_url.replace("&shape=vert", "")
         else:
+            #if we generated the renkan from no filter, the url doesn't have any "?"
+            #we add one to create the links to the other representation
+            if "?" not in current_url:
+                current_url += "?"
             switch_shape_url["horiz"] = current_url + "&shape=horiz"
             switch_shape_url["vert"] = current_url + "&shape=vert"
         context["switch_shape_url"] = switch_shape_url