From a0266c691b7ea6a12974611d8fe8986a50dd33f5 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 23 Jan 2021 14:27:21 +0100 Subject: [PATCH] Coaches have no health sheet --- apps/participation/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/participation/views.py b/apps/participation/views.py index afafbc7..235441f 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -391,7 +391,7 @@ class TeamAuthorizationsView(LoginRequiredMixin, DetailView): _("Parental authorization of {participant}.{ext}") .format(participant=str(participant), ext=ext)) - if participant.health_sheet: + if isinstance(participant, StudentRegistration) and participant.health_sheet: mime_type = magic.from_file("media/" + participant.health_sheet.name) ext = mime_type.split("/")[1].replace("jpeg", "jpg") zf.write("media/" + participant.health_sheet.name,