From 3b0db027c7a6d564362f3a9b78edbe509b2454e0 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 5 Jul 2017 00:51:05 +0200 Subject: [PATCH] Fix script upload condition --- 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 f2512c73..7c147f9a 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -346,7 +346,7 @@ class ScoreCreateView(ScriptCreateView): context = super(ScriptCreateView, self).get_context_data(**kwargs) period = Period.objects.get(id=self.kwargs['period_id']) context['period'] = period - if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True): + if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) and period.date_exam_end: context['upload'] = datetime.datetime.now() <= period.date_exam_end else: context['upload'] = False -- 2.39.5