|
|
@ -64,8 +64,9 @@ class PinnedArticleCollectionListView(generics.ListAPIView): |
|
|
def get_queryset(self): |
|
|
def get_queryset(self): |
|
|
return PinnedArticleCollection.objects.filter( |
|
|
return PinnedArticleCollection.objects.filter( |
|
|
status=True, |
|
|
status=True, |
|
|
display_position=ArticleCollection.DisplayPosition.PINNED |
|
|
|
|
|
).order_by('order', '-created_at') |
|
|
|
|
|
|
|
|
display_position=ArticleCollection.DisplayPosition.PINNED, |
|
|
|
|
|
articles__isnull=False |
|
|
|
|
|
).distinct().order_by('order', '-created_at') |
|
|
|
|
|
|
|
|
def list(self, request, *args, **kwargs): |
|
|
def list(self, request, *args, **kwargs): |
|
|
response = super().list(request, *args, **kwargs) |
|
|
response = super().list(request, *args, **kwargs) |
|
|
|