Add restore button to test view page (#164)
This commit is contained in:
1 parent
c0bedf6fbc
commit
5d1ee29358
2 files changed
+13
-4
No files matched your search
+2
-1
@@ -440,7 +440,7 @@ def test(request, id, action=None):
|
||||
if not (test := Test.objects.filter(id=id).first()):
|
||||
return django.http.HttpResponseRedirect('/index/')
|
||||
|
||||
if action not in ['APPROVE', 'RESTART', 'STOP', 'DELETE', 'MODIFY']:
|
||||
if action not in ['APPROVE', 'RESTART', 'STOP', 'DELETE', 'RESTORE', 'MODIFY']:
|
||||
data = { 'test' : test, 'results': Result.objects.filter(test=test) }
|
||||
return render(request, 'test.html', data)
|
||||
|
||||
@@ -459,6 +459,7 @@ def test(request, id, action=None):
|
||||
if action == 'RESTART': test.finished = False; test.save()
|
||||
if action == 'STOP' : test.finished = True; test.save()
|
||||
if action == 'DELETE' : test.deleted = True; test.save()
|
||||
if action == 'RESTORE': test.deleted = False; test.save()
|
||||
|
||||
if action == 'MODIFY':
|
||||
test.priority = int(request.POST['priority'])
|
||||
|
||||
Reference in new issue
Block a user