]> git.parisson.com Git - teleforma.git/commitdiff
fix again
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Jul 2017 23:14:09 +0000 (01:14 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Jul 2017 23:14:09 +0000 (01:14 +0200)
teleforma/exam/views.py

index 63750515d71fd124402b6380b3a36278dafba4a2..dc6560ee645ea607b805bb06b8fd1a105d5ddcda 100644 (file)
@@ -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