From 4d1c1ce952c35dd2a3b9960c2f25df4cc79284da Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 25 Aug 2009 16:18:01 -0400 Subject: [PATCH] check if Idea is registered with gatekeeper --- brainstorm/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brainstorm/views.py b/brainstorm/views.py index 6b6ed06..8e9b6ac 100644 --- a/brainstorm/views.py +++ b/brainstorm/views.py @@ -15,7 +15,8 @@ def idea_list(request, slug, ordering='-total_upvotes'): ordering_db = {'most_popular': '-score', 'latest': '-submit_date'}[ordering] qs = Idea.objects.with_user_vote(request.user).filter(subsite__slug=slug).select_related().order_by(ordering_db) - #print qs + if hasattr(qs, '_gatekeeper'): + qs = qs.approved() return list_detail.object_list(request, queryset=qs, extra_context={'ordering': ordering, 'subsite':slug}, paginate_by=10, template_object_name='idea')