Skip to content

Commit cdc7c0e

Browse files
author
I
committed
rename variable to benchmark_types for clarity
product(): use plural `benchmark_types` to reflect that we pass a list product.html: iterate over `benchmark_types`
1 parent 8b8958b commit cdc7c0e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dojo/product/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def product(request):
148148
prod_list.object_list = prefetch_for_product(prod_list.object_list)
149149

150150
# Get benchmark types for the template
151-
benchmark_type = Benchmark_Type.objects.filter(enabled=True).order_by("name")
151+
benchmark_types = Benchmark_Type.objects.filter(enabled=True).order_by("name")
152152

153153
add_breadcrumb(title=_("Product List"), top_level=not len(request.GET), request=request)
154154

@@ -157,7 +157,7 @@ def product(request):
157157
"prod_filter": prod_filter,
158158
"name_words": sorted(set(name_words)),
159159
"enable_table_filtering": get_system_setting("enable_ui_table_based_searching"),
160-
"benchmark_type": benchmark_type,
160+
"benchmark_types": benchmark_types,
161161
"user": request.user})
162162

163163

dojo/templates/dojo/product.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ <h3 class="has-filters">
162162
{% if prod|has_object_permission:"Benchmark_Edit" %}
163163
{% if system_settings.enable_benchmark and benchmark_type %}
164164
<li role="separator" class="divider"></li>
165-
{% for bt in benchmark_type %}
165+
{% for bt in benchmark_types %}
166166
<li role="presentation">
167167
<a title="{{ bt.name }}" href="{% url 'view_product_benchmark' prod.id bt.id %}">
168168
<span class="fa-solid fa-list-ul"></span> {{ bt.name }} {{ bt.version }}

0 commit comments

Comments
 (0)