mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 18:02:50 +02:00
Address, responsible and phone number were missing. Use Google Maps API to query the address, to ensure to have valid addresses
This commit is contained in:
@ -171,11 +171,13 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
||||
context["title"] = _("Detail of team {trigram}").format(trigram=self.object.trigram)
|
||||
context["request_validation_form"] = RequestValidationForm(self.request.POST or None)
|
||||
context["validation_form"] = ValidateParticipationForm(self.request.POST or None)
|
||||
# A team is complete when there are at least 3 members that have sent their photo authorization
|
||||
# and confirmed their email address
|
||||
context["can_validate"] = team.students.count() >= 3 and \
|
||||
# A team is complete when there are at least 4 members plus a coache that have sent their photo authorization,
|
||||
# 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.coachs.exists() and \
|
||||
all(r.email_confirmed for r in team.students.all()) and \
|
||||
all(r.photo_authorization for r in team.students.all())
|
||||
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
|
||||
|
||||
|
Reference in New Issue
Block a user