Skip to content

Commit

Permalink
fix case mismatches for area page place data matching
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Dec 4, 2023
1 parent 7d0ec5d commit 123d78f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hub/templates/hub/area/_opinion_table_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h5>{{ title }}</h5>
</thead>
<tbody>
{% for datum in category %}
{% if datum.subcategory == subcategory %}
{% if datum.subcategory.lower == subcategory.lower %}
<tr>
<th>{{ datum.name | simplify_dataset_name }}</th>
<td>{{ datum.data.value|floatformat }}%</td>
Expand Down
10 changes: 5 additions & 5 deletions hub/templates/hub/area/_place_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h5>{{ category.name }}</h5>
{% include "hub/area/_favourite.html" %}
</div>
<div class="card-body">
{% if category.name == "Constituency age distribution" %}
{% if category.name.lower == 'constituency age distribution' %}
<table class="table mb-0 js-chart" data-chart-type="bar" data-chart-direction="y">
<thead>
<tr>
Expand All @@ -28,7 +28,7 @@ <h5>{{ category.name }}</h5>
{% endfor %}
</tbody>
</table>
{% elif category.name == "Ethnicity" %}
{% elif category.name.lower == 'ethnicity' %}
<table class="table mb-0">
<thead>
<tr>
Expand All @@ -47,7 +47,7 @@ <h5>{{ category.name }}</h5>
{% endfor %}
</tbody>
</table>
{% elif category.name == 'Socio-Economic Status' %}
{% elif category.name.lower == 'socio-economic status' %}
<table class="table mb-0">
<thead>
<tr>
Expand Down Expand Up @@ -83,7 +83,7 @@ <h5>{{ category.name }}</h5>
{% endfor %}
</body>
</table>
{% elif category.name == 'Air pollution' %}
{% elif category.name.lower == 'air pollution' %}
<table class="table mb-0">
<thead>
<tr>
Expand All @@ -107,7 +107,7 @@ <h5>{{ category.name }}</h5>
{% endfor %}
</tbody>
</table>
{% elif category.name == 'Flood risk from rivers or sea' %}
{% elif category.name.lower == 'flood risk from rivers or sea' %}
<table class="table mb-0 js-chart" data-chart-type="bar" data-chart-direction="y"">
<thead>
<tr>
Expand Down

0 comments on commit 123d78f

Please sign in to comment.