From 1a63c1f399406a32a084b13593153ed8e275aaa3 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 21 Jan 2021 22:16:01 +0100 Subject: [PATCH] health_sheet field is now in StudentRegistration --- apps/registration/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index b57b4d8..e8c621f 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -486,7 +486,7 @@ class HealthSheetView(LoginRequiredMixin, View): path = f"media/authorization/health/{filename}" if not os.path.exists(path): raise Http404 - student = ParticipantRegistration.objects.get(health_sheet__endswith=filename) + student = StudentRegistration.objects.get(health_sheet__endswith=filename) user = request.user if not (student.user == user or user.registration.is_admin or user.registration.is_volunteer and student.team and student.team.participation.tournament in user.registration.organized_tournaments.all()):