e
This commit is contained in:
parent
58646f7cd9
commit
4c2cf910a4
@ -73,8 +73,8 @@ class ExerciceAPI(APIView):
|
|||||||
try:
|
try:
|
||||||
exo = Exercice.objects.get(id_code=code)
|
exo = Exercice.objects.get(id_code=code)
|
||||||
except:
|
except:
|
||||||
exo = None
|
|
||||||
return Response({'error': "Not found"}, status= status.HTTP_404_NOT_FOUND)
|
return Response({'error': "Not found"}, status= status.HTTP_404_NOT_FOUND)
|
||||||
|
|
||||||
isUser = False
|
isUser = False
|
||||||
if request.user == exo.author:
|
if request.user == exo.author:
|
||||||
isUser = True
|
isUser = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user