diff --git a/apps/core/views/viewsets/article.py b/apps/core/views/viewsets/article.py index 01070933..c1eb9a5b 100644 --- a/apps/core/views/viewsets/article.py +++ b/apps/core/views/viewsets/article.py @@ -94,6 +94,10 @@ def filter_queryset(self, queryset): name_type=BoardNameType.ANONYMOUS ) + queryset = queryset.prefetch_related( + 'attachments' + ) + # optimizing queryset for list action queryset = queryset.select_related( 'created_by',