Flag tests on the home screen if they have errors

This commit is contained in:
Andrew Grant committed 2020-05-02 20:58:17 -04:00
1 parent b295842066
commit 764b65e755
4 files changed
+10 -4

No files matched your search

+6 -2
View File
@@ -561,11 +561,15 @@ def clientSubmitError(request):
machine = Machine.objects.get(id=int(request.POST['machineid']))
if machine.user != user: return HttpResponse('Bad Machine')
# Flag the Test as having an error
test = Test.objects.get(id=int(request.POST['testid']))
test.error = True; test.save()
# Log the Error into the Events table
LogEvent.objects.create(
test = test,
author = user.username,
data = request.POST['error'],
test = Test.objects.get(id=int(request.POST['testid'])))
data = request.POST['error'])
return HttpResponse('None')