Skip to content

Commit a916ce9

Browse files
committed
Twins page bug fixes
- Prevent overwriting of `council` context variable, which was causing the incorrect page title to be output. - Swap council names in empty state messages.
1 parent 3619007 commit a916ce9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

caps/templates/caps/twins.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h2>{{ council.short_name }}’s climate plans</h2>
8383
</ul>
8484
{% else %}
8585
<p class="px-3 mb-0 text-muted">
86-
(No terms appear in just {{ twin.short_name }}’s plans.)
86+
(No terms appear in just {{ council.short_name }}’s plans.)
8787
</p>
8888
{% endif %}
8989
</ul>
@@ -144,7 +144,7 @@ <h2>{{ twin.short_name }}’s climate plans</h2>
144144
</ul>
145145
{% else %}
146146
<p class="px-3 mb-0 text-muted">
147-
(No terms appear in just {{ council.short_name }}’s plans.)
147+
(No terms appear in just {{ twin.short_name }}’s plans.)
148148
</p>
149149
{% endif %}
150150
{% if twin.plan_overlap.overlap %}

caps/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ def get_context_data(self, **kwargs):
498498
council.related_council_keyphrase_intersection()
499499
)
500500
for group in related_councils:
501-
for council in group["councils"]:
502-
council.plan_overlap = related_councils_intersection[council]
501+
for c in group["councils"]:
502+
c.plan_overlap = related_councils_intersection[c]
503503
if group["type"].slug == "composite":
504504
twin = group["councils"][0]
505505
context["twin"] = twin

0 commit comments

Comments
 (0)