Fix team validation

This commit is contained in:
ynerant 2021-02-07 17:40:29 +01:00
parent c9067d5202
commit 7a0cb64fb6
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
"""
An admin validates the team (or not)
"""
if not self.request.user.user.registration.is_admin and \
if not self.request.user.registration.is_admin and \
(not self.object.participation.tournament
or self.request.user.registration not in self.object.participation.tournament.organizers.all()):
form.add_error(None, _("You are not an organizer of the tournament."))