From: Guillaume Pellerin Date: Tue, 4 Jul 2017 22:51:05 +0000 (+0200) Subject: Fix script upload condition X-Git-Tag: 1.1~11 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3b0db027c7a6d564362f3a9b78edbe509b2454e0;p=teleforma.git Fix script upload condition --- 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