From 209202f29574d78173904702db4c91331ad39be0 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 5 Aug 2015 21:53:12 +0200 Subject: [PATCH] fix script submit when rejected before --- teleforma/exam/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index a41b96b6..3d90b46b 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -160,7 +160,7 @@ class ScriptCreateView(CreateView): def form_valid(self, form): scripts = Script.objects.filter(course=form.cleaned_data['course'], session=form.cleaned_data['session'], - type=form.cleaned_data['type'], author=self.request.user) + type=form.cleaned_data['type'], author=self.request.user).exclude(status=0) if scripts: messages.error(self.request, _("Error: you have already submitted a script for this session, the same course and the same type!")) return redirect('teleforma-exam-script-create', self.kwargs['period_id']) -- 2.39.5