From 4c2cf910a4da0a0d945cb5643700c3e7433b5e3e Mon Sep 17 00:00:00 2001 From: Kilton937342 Date: Fri, 24 Jun 2022 20:04:50 +0200 Subject: [PATCH] e --- backend/api/exercices/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/exercices/views.py b/backend/api/exercices/views.py index 6380d4e8..68083ddf 100644 --- a/backend/api/exercices/views.py +++ b/backend/api/exercices/views.py @@ -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