From f057aac6bcfa7ee762990a979e34f0c7a820caf3 Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 12 Feb 2013 12:22:34 +0100 Subject: [PATCH] fix testimonial list --- teleforma/views/pro.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 3b6f12a8..c5e936f9 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -620,7 +620,14 @@ class TestimonialListView(ListView): template_name='teleforma/testimonials.html' def get_queryset(self): - return Testimonial.objects.filter(user=self.request.user) + t = [] + user = self.request.user + testimonials = Testimonial.objects.filter(user=user) + for testimonial in testimonials: + seminar = testimonial.seminar + if seminar_progress(user, seminar) == 100 and seminar_validated(user, seminar): + t.append(testimonial) + return t @method_decorator(login_required) def dispatch(self, *args, **kwargs): -- 2.39.5