This commit is contained in:
Kilton937342 2022-06-24 20:04:50 +02:00
parent 58646f7cd9
commit 4c2cf910a4
1 changed files with 1 additions and 1 deletions

View File

@ -73,8 +73,8 @@ class ExerciceAPI(APIView):
try:
exo = Exercice.objects.get(id_code=code)
except:
exo = None
return Response({'error': "Not found"}, status= status.HTTP_404_NOT_FOUND)
isUser = False
if request.user == exo.author:
isUser = True