From 2ed9da83e3052f8fa11865e290f4cc47b4490903 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 3 Jan 2017 13:58:39 +0100 Subject: [PATCH] fix no testimonial seminar --- 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 ca570246..8804d141 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -725,9 +725,10 @@ class TestimonialListView(ListView): user = self.request.user testimonials = Testimonial.objects.filter(user=user) for testimonial in testimonials: - seminar = testimonial.seminar - if seminar_validated(user, seminar) and (get_seminar_delta(user, seminar) >= 0 or testimonial.date_added <= REVISION_DATE_FILTER): - t.append(testimonial) + if testimonial.seminar: + seminar = testimonial.seminar + if seminar_validated(user, seminar) and (get_seminar_delta(user, seminar) >= 0 or testimonial.date_added <= REVISION_DATE_FILTER): + t.append(testimonial) return t @method_decorator(login_required) -- 2.39.5