From 7984ce8e1da42e2a8348c4f23a0202d6fa5a26c0 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 14 Mar 2021 18:57:51 +0100 Subject: [PATCH] object -> get_object() --- apps/participation/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/participation/views.py b/apps/participation/views.py index e82df54..7ba66fe 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -292,7 +292,7 @@ class TeamUpdateView(LoginRequiredMixin, UpdateView): if user.registration.is_admin or user.registration.participates and \ user.registration.team and user.registration.team.pk == kwargs["pk"] \ 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) raise PermissionDenied