fixed product views to only list active products

This commit is contained in:
Sam
2021-03-05 11:49:21 +00:00
parent 375db09bb3
commit 8518bd09ce
4 changed files with 33 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ def find_related_products_v6(keyword, shipping_cost=None, discount=None, categor
products_qs = Product.objects.annotate(
rank=SearchRank(vector, query)
).filter(rank__gt=0.05)
).filter(rank__gt=0.05, active=True)
# filter by category
if category is not None: