Skip to content

Commit

Permalink
fix: Fetch only pubslished blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara committed Jul 9, 2024
1 parent 1a0d6ba commit 4b1e076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ietf/blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def redirect_first(self, request, slug=None, *args, **kwargs):
self.filter_topic = Topic.objects.filter(slug=slug).first()
if not self.filter_topic:
blog_page = get_object_or_404(
BlogPage.objects.prefetch_related("authors"), slug=slug
BlogPage.objects.live().prefetch_related("authors"), slug=slug
)
return blog_page.serve(request, *args, **kwargs)

Expand Down

0 comments on commit 4b1e076

Please sign in to comment.