object -> get_object()

This commit is contained in:
Yohann D'ANELLO 2021-03-14 23:46:11 +01:00
parent 7984ce8e1d
commit 8fc99803c1
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ class ParticipationDetailView(LoginRequiredMixin, DetailView):
and user.registration.team.participation \
and user.registration.team.participation.pk == kwargs["pk"] \
or user.registration.is_volunteer \
and self.object.tournament in user.registration.interesting_tournaments:
and self.get_object().tournament in user.registration.interesting_tournaments:
return super().dispatch(request, *args, **kwargs)
raise PermissionDenied