From: Guillaume Pellerin Date: Tue, 3 Jan 2017 12:58:39 +0000 (+0100) Subject: fix no testimonial seminar X-Git-Tag: 2.8.1-pro~219 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2ed9da83e3052f8fa11865e290f4cc47b4490903;p=teleforma.git fix no testimonial seminar --- 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)