Skip to content

Commit

Permalink
2028 - No templates in featured articles
Browse files Browse the repository at this point in the history
  • Loading branch information
smithellis committed Oct 31, 2024
1 parent 5d6c2e3 commit fae5519
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kitsune/wiki/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def get_featured_articles(product=None, locale=settings.WIKI_DEFAULT_LANGUAGE):
)
.exclude(document__products__slug__in=settings.EXCLUDE_PRODUCT_SLUGS_FEATURED_ARTICLES)
.exclude(document__is_archived=True)
.exclude(document__is_template=True)
.order_by("-visits")
.select_related("document")
)
Expand All @@ -135,7 +136,10 @@ def get_featured_articles(product=None, locale=settings.WIKI_DEFAULT_LANGUAGE):
Prefetch(
"document__translations",
queryset=Document.objects.visible(
locale=locale, current_revision__is_approved=True, is_archived=False
locale=locale,
current_revision__is_approved=True,
is_archived=False,
is_template=False,
),
)
)
Expand Down

0 comments on commit fae5519

Please sign in to comment.