src/hdalab/views/profile.py
changeset 434 c73bf54da095
parent 431 adb0be6dfdcf
child 436 deb24a52827f
--- 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