Only include blog posts in similar posts
This commit is contained in:
parent
d199c3a681
commit
f427fc7bb5
1 changed files with 3 additions and 1 deletions
|
@ -94,7 +94,9 @@ class BlogPostPage(BaseContentPage):
|
||||||
|
|
||||||
def get_similar_posts(self) -> models.QuerySet:
|
def get_similar_posts(self) -> models.QuerySet:
|
||||||
try:
|
try:
|
||||||
listing_pages = BlogPostListPage.objects.get().get_listing_pages()
|
listing_pages = BlogPostPage.objects.filter(
|
||||||
|
id__in=BlogPostListPage.objects.get().get_listing_pages()
|
||||||
|
)
|
||||||
except BlogPostListPage.DoesNotExist:
|
except BlogPostListPage.DoesNotExist:
|
||||||
return BlogPostPage.objects.none()
|
return BlogPostPage.objects.none()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue