delete testing
This commit is contained in:
1 parent
147675fad3
commit
744f051490
1 file changed
+1
-1
@@ -235,7 +235,7 @@ class TestingView(generics.ListCreateAPIView):
|
|||||||
def delete(self, request):
|
def delete(self, request):
|
||||||
testing_id = request.data.get("id")
|
testing_id = request.data.get("id")
|
||||||
try:
|
try:
|
||||||
testing = self.get_object(Testing, id=testing_id)
|
testing = Testing.objects.get(id=testing_id)
|
||||||
testing.delete()
|
testing.delete()
|
||||||
return Response({"status": "success", "message": "Testing deleted successfully."},
|
return Response({"status": "success", "message": "Testing deleted successfully."},
|
||||||
status=200)
|
status=200)
|
||||||
|
|||||||
Reference in new issue
Block a user