object -> get_object()
This commit is contained in:
parent
3f46e23588
commit
7984ce8e1d
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue