Fix team validation
This commit is contained in:
parent
c9067d5202
commit
7a0cb64fb6
|
@ -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."))
|
||||
|
|
Loading…
Reference in New Issue