changes to related product action, test ok
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user