From: Yoan Le Clanche Date: Wed, 14 Mar 2018 13:24:37 +0000 (+0100) Subject: fix testimonial date : https://trackers.pilotsystems.net/probarreau/0283 X-Git-Tag: 2.8.1-pro~207 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=39adcc104c88441b776ea6d19cc88297081d9d30;p=teleforma.git fix testimonial date : https://trackers.pilotsystems.net/probarreau/0283 --- diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index eed22d21..91e9005e 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -254,6 +254,10 @@ class SeminarView(SeminarAccessMixin, DetailView): testimonials = Testimonial.objects.filter(user=user, seminar=seminar) if not testimonials: testimonial = Testimonial(user=user, seminar=seminar) + now = datetime.datetime.now() + if seminar.expiry_date < now: + testimonial.date_modified = seminar.expiry_date + testimonial.save() # text = render_to_string('teleforma/messages/seminar_validated.txt', context) # subject = seminar.title + ' : ' + unicode(_('all your answers has been validated'))