1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 19:02:33 +00:00

object -> get_object()

This commit is contained in:
Yohann D'ANELLO 2021-03-14 18:57:51 +01:00
parent 3f46e23588
commit 7984ce8e1d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

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