Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Changed partial_user_list template to prevent error message when a gym has no users.

purplebird4c7f357495d4
diff --git a/wger/gym/templates/gym/partial_user_list.html b/wger/gym/templates/gym/partial_user_list.html
index 0ac51ca97..0c8da873f 100644
--- a/wger/gym/templates/gym/partial_user_list.html
+++ b/wger/gym/templates/gym/partial_user_list.html
@@ -17,9 +17,11 @@ $(document).ready( function () {
<table class="table table-hover" id="main_member_list">
<thead>
<tr>
- {% for key in user_table.keys %}
- <th>{{ key }}</th>
- {% endfor %}
+ {% if user_count > 0 %}
+ {% for key in user_table.keys %}
+ <th>{{ key }}</th>
+ {% endfor %}
+ {% endif %}
</tr>
</thead>
<tbody>
@@ -55,4 +57,4 @@ $(document).ready( function () {
</tr>
{% endfor %}
</tbody>
-</table>
\ No newline at end of file
+</table>