Skip to content

Commit

Permalink
Fix FeaturedPostsPlugin get_posts method rendering all posts instead …
Browse files Browse the repository at this point in the history
…of selected ones
  • Loading branch information
protoroto committed Dec 22, 2023
1 parent 25c6d74 commit f39bcaf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions djangocms_blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +611,7 @@ def copy_relations(self, oldinstance):
self.posts.set(oldinstance.posts.all())

def get_posts(self, request, published_only=True):
# if self.posts.exists():
# posts = self.post_queryset(request, published_only, selected_posts=self.posts.all())
# else:
# posts = self.post_queryset(request, published_only)
posts = self.post_queryset(request, published_only)
posts = self.post_queryset(request, published_only, selected_posts=self.posts.all())
return posts


Expand Down

0 comments on commit f39bcaf

Please sign in to comment.