From 39adcc104c88441b776ea6d19cc88297081d9d30 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Wed, 14 Mar 2018 14:24:37 +0100 Subject: [PATCH] fix testimonial date : https://trackers.pilotsystems.net/probarreau/0283 --- teleforma/views/pro.py | 4 ++++ 1 file changed, 4 insertions(+) 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')) -- 2.39.5