From 19a8dd41727d6fd6782897661d1bbe66e4849cd9 Mon Sep 17 00:00:00 2001 From: Andrew Grant Date: Mon, 1 Jun 2020 22:30:30 -0400 Subject: [PATCH] Don't kill tests on a NULL bench --- OpenBench/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenBench/views.py b/OpenBench/views.py index ffd11a3..52472b3 100644 --- a/OpenBench/views.py +++ b/OpenBench/views.py @@ -497,8 +497,9 @@ def clientWrongBench(request): if machine.user != user: return HttpResponse('Bad Machine') # Find and stop the test with the bad bench - test = Test.objects.get(id=int(request.POST['testid'])) - test.finished = True; test.save() + if int(request.POST['wrong']) != 0: + test = Test.objects.get(id=int(request.POST['testid'])) + test.finished = True; test.save() # Collect information on the Error wrong = request.POST['wrong']