e
This commit is contained in:
parent
58646f7cd9
commit
4c2cf910a4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user