From d2949190b2549edd15cd699608e37a648958f6d2 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 5 Jul 2017 01:14:09 +0200 Subject: [PATCH] fix again --- teleforma/exam/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index 63750515..dc6560ee 100644 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -19,8 +19,8 @@ class ScriptMixinView(View): context = super(ScriptMixinView, self).get_context_data(**kwargs) self.period = Period.objects.get(id=self.kwargs['period_id']) context['period'] = self.period - if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) and period.date_exam_end: - context['upload'] = datetime.datetime.now() <= period.date_exam_end + if getattr(settings, 'TELEFORMA_EXAM_SCRIPT_UPLOAD', True) and self.period.date_exam_end: + context['upload'] = datetime.datetime.now() <= self.period.date_exam_end else: context['upload'] = False return context -- 2.39.5