From 6a98be8ac194c563af7a433a04ebea8c93df8551 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 21 Jul 2014 23:54:21 +0200 Subject: [PATCH] test --- teleforma/views/pro.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 97cc97b0..45a2b744 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -174,12 +174,13 @@ class SeminarView(SeminarAccessMixin, DetailView): messages.info(self.request, _("You have successfully terminated all steps of your e-learning seminar. You can now download your training testimonial below.")) delta = self.get_delta(user, seminar) - context['delta'] = str(delta).split('.')[0] - #TODO if datetime.datetime.now() > REVISION_DATE_FILTER: - context['seminar_time'] = delta - datetime.timedelta(seconds=seminar.duration.as_seconds()) + time = delta - datetime.timedelta(seconds=seminar.duration.as_seconds()) + context['seminar_time'] = time.total_seconds() + context['delta'] = str(delta).split('.')[0] else: context['seminar_time'] = 1 + context['delta'] = '10:37:28' return context @jsonrpc_method('teleforma.publish_seminar') -- 2.39.5