Fix season_information.category bug

This commit is contained in:
Gregory Trullemans 2024-04-16 12:38:55 +02:00
parent f887477421
commit 65403d79dd
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@
</a>
<p class="description">
{{ last_season_information.club.name }}<br />
<b>{{ last_season_information.get_category_display }}</b>
<b>{{ last_season_information.category.short_label }}</b>
</p>
</div>
<div class="card-description">

View File

@ -48,7 +48,7 @@
<td class="text-center"><b>{{ season_information.number_of_hours_per_week }}</b></td>
<td class="text-center">{{ season_information.number_of_s_and_c_sessions_per_week }}</td>
<td class="text-center"><b>{{ season_information.number_of_s_and_c_hours_per_week }}</b></td>
<td class="text-center"><b>{{ season_information.get_category_display }}</b></td>
<td class="text-center"><b>{{ season_information.category.short_label }}</b></td>
</tr>
{% endfor %}
</tbody>

View File

@ -176,7 +176,7 @@ def gymnast_display_season_informations(request, gymnast_id):
gymnast_id (int) identifiant du gymnast
"""
gymnast = get_object_or_404(Gymnast, pk=gymnast_id)
season_information_list = SeasonInformation.objects.filter(gymnast=gymnast_id)
season_information_list = gymnast.season_informations.all()
context = {"season_information_list": season_information_list, "gymnast": gymnast}
return render(request, "gymnasts/tabs/tab_season_informations.html", context)