Skip to content

Commit

Permalink
Merge pull request #6324 from smithellis/2028-templates-in-featured
Browse files Browse the repository at this point in the history
2028 - No templates in featured articles
  • Loading branch information
akatsoulas authored Oct 31, 2024
2 parents 5d6c2e3 + fae5519 commit a706123
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 a706123

Please sign in to comment.