Merge pull request #69 from sgoudelis/bugfix/blog_publish

Fixed issue with publish flag not be respected when getting blog post…
This commit is contained in:
Nico Schottelius 2016-05-16 21:39:16 +09:00
commit 8d531a2995

View file

@ -33,7 +33,7 @@ class PostListViewUngleich(PostListView):
def get_queryset(self): def get_queryset(self):
language = get_language() language = get_language()
queryset = self.model.objects.translated(language) queryset = self.model.objects.filter(publish=True).translated(language)
setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config) setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config)
return queryset return queryset