From 79393320c170941d9337f5a052ac8109b5451ff7 Mon Sep 17 00:00:00 2001 From: Diego Calvo Date: Fri, 19 Mar 2021 14:31:59 +0100 Subject: [PATCH] get_descendats categories in search_products --- products/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/views.py b/products/views.py index 21ddd1b..bf67980 100644 --- a/products/views.py +++ b/products/views.py @@ -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