product search only for active products

This commit is contained in:
Sam
2021-03-08 11:50:43 +00:00
parent cd6f8e558e
commit ebd1b6744c

View File

@@ -169,7 +169,7 @@ def product_search(request):
if q == '':
# filter entire queryset
products_qs = Product.objects.all()
products_qs = Product.objects.filter(active=True)
if tags:
products_qs = Product.objects.filter(tags=tags)
if category: