get_descendats categories in search_products
This commit is contained in:
@@ -188,7 +188,7 @@ def product_search(request):
|
||||
cat = CategoryTag.objects.filter(label__iexact=entry).first()
|
||||
# append category tag, and children
|
||||
descendants.append(cat)
|
||||
descendants.extend(cat.children.all())
|
||||
descendants.extend(cat.get_descendants())
|
||||
|
||||
products_qs = products_qs.filter(category__in=descendants)
|
||||
# filter by tags
|
||||
|
||||
Reference in New Issue
Block a user