summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-24 02:16:58 +0100
committerDan McGee <dan@archlinux.org>2012-03-24 02:16:58 +0100
commitea87160c397fe1daf63851f0ed0be146bea79196 (patch)
tree10d49306607c4b60b6996e4cebffbc13d6635eea
parent20899d59c078a879646dd689cf5795ebbc8b91df (diff)
downloadarchweb-ea87160c397fe1daf63851f0ed0be146bea79196.tar.gz
archweb-ea87160c397fe1daf63851f0ed0be146bea79196.tar.xz
releng: ensure links are valid for option names with spaces
Can't believe this went unnoticed for so long. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--releng/views.py1
-rw-r--r--templates/releng/result_section.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/releng/views.py b/releng/views.py
index 2b3d093..d8ea59f 100644
--- a/releng/views.py
+++ b/releng/views.py
@@ -81,6 +81,7 @@ def calculate_option_overview(field_name):
is_rollback = field_name.startswith('rollback_')
option = {
'option': model,
+ 'field_name': field_name,
'name': model._meta.verbose_name,
'is_rollback': is_rollback,
'values': []
diff --git a/templates/releng/result_section.html b/templates/releng/result_section.html
index 08e46fb..e9375cd 100644
--- a/templates/releng/result_section.html
+++ b/templates/releng/result_section.html
@@ -6,7 +6,7 @@
{% for item in option.values %}
<tr>
<td>
- <a href="{% url releng-results-for option.name|lower item.value.pk %}">
+ <a href="{% url releng-results-for option.field_name item.value.pk %}">
{{ item.value.name|lower }}
</a>
</td>