Skip to content

Commit

Permalink
Filter out non-useful articles.
Browse files Browse the repository at this point in the history
  • Loading branch information
mythmon committed May 29, 2014
1 parent a201ddf commit 1c041fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kitsune/wiki/api.py
@@ -1,3 +1,4 @@
from django.conf import settings
from django.db.models import Q
from django.shortcuts import get_object_or_404

Expand Down Expand Up @@ -33,6 +34,9 @@ class DocumentList(CORSMixin, LocaleNegotiationMixin, generics.ListAPIView):
def get_queryset(self):
queryset = self.queryset

queryset = queryset.filter(category__in=settings.IA_DEFAULT_CATEGORIES,
current_revision__isnull=False)

locale = self.get_locale()
product = self.request.QUERY_PARAMS.get('product')
topic = self.request.QUERY_PARAMS.get('topic')
Expand Down

0 comments on commit 1c041fa

Please sign in to comment.