changes to related product action, test ok

This commit is contained in:
Sam
2021-03-10 12:13:21 +00:00
parent 39c8bd5e44
commit bb0b8729cb
3 changed files with 43 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ class ProductViewSet(viewsets.ModelViewSet):
"""
# TODO: find the most similar products
product = self.get_object()
qs = get_related_products(product.description, product.tags.all(), product.attributes.all(), product.category)
qs = get_related_products(product)
serializer = self.serializer_class(qs, many=True)
return Response(data=serializer.data)