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()):