From: Guillaume Pellerin Date: Tue, 4 Jul 2017 23:14:09 +0000 (+0200) Subject: fix again X-Git-Tag: 1.1~7 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d2949190b2549edd15cd699608e37a648958f6d2;p=teleforma.git fix again --- 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