1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-08-04 17:01:14 +02:00

Fix tests

This commit is contained in:
Yohann D'ANELLO
2021-01-18 22:28:43 +01:00
parent d05a8339fe
commit ef4d74545a
7 changed files with 164 additions and 128 deletions

View File

@@ -174,10 +174,10 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
# A team is complete when there are at least 4 members plus a coache that have sent their authorizations,
# their health sheet, they confirmed their email address and under-18 people sent their parental authorization.
context["can_validate"] = team.students.count() >= 4 and team.coaches.exists() and \
all(r.email_confirmed for r in team.students.all()) and \
all(r.photo_authorization for r in team.participants.all()) and \
all(r.health_sheet for r in team.participants.all()) and \
all(r.parental_authorization for r in team.students.all() if r.under_18)
all(r.email_confirmed for r in team.students.all()) and \
all(r.photo_authorization for r in team.participants.all()) and \
all(r.health_sheet for r in team.participants.all()) and \
all(r.parental_authorization for r in team.students.all() if r.under_18)
return context