mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 07:02:24 +00:00
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)
|
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
|
(not self.object.participation.tournament
|
||||||
or self.request.user.registration not in self.object.participation.tournament.organizers.all()):
|
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."))
|
form.add_error(None, _("You are not an organizer of the tournament."))
|
||||||
|
Loading…
Reference in New Issue
Block a user