1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-05 14:43:55 +02:00

Test video upload

This commit is contained in:
Yohann D'ANELLO
2020-09-27 16:52:52 +02:00
parent 4b8ed14180
commit 366f0c40a0
5 changed files with 30 additions and 4 deletions

View File

@ -147,7 +147,7 @@ class UploadVideoView(LoginRequiredMixin, UpdateView):
def dispatch(self, request, *args, **kwargs):
user = request.user
if user.registration.is_admin or user.registration.participates\
and user.registration.team.participation.pk == self.object.participation.pk:
and user.registration.team.participation.pk == self.get_object().participation.pk:
return super().dispatch(request, *args, **kwargs)
raise PermissionDenied