product refactor bullshit

This commit is contained in:
Parsa Nazer
2025-02-08 17:37:57 +03:30
parent ef2d35b2ed
commit 31782bf743
8 changed files with 200 additions and 63 deletions
+1 -1
View File
@@ -224,7 +224,7 @@ class CommentView(APIView):
)
def get(self, request, pk):
product = get_object_or_404(ProductModel, id=pk)
comments = product.comments.filter(show=True)
comments = product.comments.filter(review_status__in=['not_reviwed', 'reviewed_and_confirmed'])
paginator = self.pagination_class()
paginated_comments = paginator.paginate_queryset(comments, request)
comments_ser = self.serializer_class(instance=paginated_comments, many=True)