mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-20 03:41:26 +02:00
Prevent some errors
This commit is contained in:
@ -557,8 +557,8 @@ class ParticipationDetailView(LoginRequiredMixin, DetailView):
|
||||
if not self.get_object().valid:
|
||||
raise PermissionDenied(_("The team is not validated yet."))
|
||||
if user.registration.is_admin or user.registration.participates \
|
||||
and user.registration.team.participation \
|
||||
and user.registration.team.participation.pk == kwargs["pk"] \
|
||||
and user.registration.team \
|
||||
and user.registration.team.participation_id == kwargs["pk"] \
|
||||
or user.registration.is_volunteer \
|
||||
and (self.get_object().tournament in user.registration.interesting_tournaments
|
||||
or self.get_object().final
|
||||
|
Reference in New Issue
Block a user