product refactor bullshit
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user