google login with user type and is published article only display

This commit is contained in:
jain
2023-08-23 17:15:54 +05:30
parent 4e0c6a91f4
commit 20644a6293
2 changed files with 38 additions and 8 deletions

View File

@ -229,7 +229,7 @@ class ArticleListViewSet(GenericViewSet, mixins.ListModelMixin):
http_method_names = ['get',]
def get_queryset(self):
article = self.queryset.objects.filter(is_deleted=False).prefetch_related(
article = self.queryset.objects.filter(is_deleted=False, is_published=True).prefetch_related(
'article_cards', 'article_survey', 'article_survey__options'
).order_by('-created_at')
queryset = self.filter_queryset(article)