From d6aa285bc53a5472d715784cf5d89f872b472138 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 10 Apr 2021 11:43:31 +0200 Subject: [PATCH] Display notes for authenticated users --- apps/participation/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/participation/views.py b/apps/participation/views.py index afeee63..e0a0003 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -540,7 +540,8 @@ class TournamentDetailView(DetailView): for participation in self.object.participations.all(): note = sum(pool.average(participation) for pool in self.object.pools.filter(participations=participation).all() - if pool.results_available or self.request.user.registration.is_volunteer) + if pool.results_available + or (self.request.user.is_authenticated and self.request.user.registration.is_volunteer)) if note: notes[participation] = note context["notes"] = sorted(notes.items(), key=lambda x: x[1], reverse=True)