From cf719854e1d9f24ab1a51ca6f4c88845ef9fd1de Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Tue, 17 Jun 2025 11:25:42 +0300 Subject: [PATCH] Fixes: 1) Correct field from `product_set` to `products` in category filtering logic; Extra: None; --- core/filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/filters.py b/core/filters.py index 57f4a588..78979799 100644 --- a/core/filters.py +++ b/core/filters.py @@ -336,8 +336,8 @@ class CategoryFilter(FilterSet): def filter_whole_categories(self, queryset, _name, value): if value: - return queryset.filter(product_set__isnull=False).distinct() - return queryset.filter(product_set__isnull=True).distinct() + return queryset.filter(products__isnull=False).distinct() + return queryset.filter(products__isnull=True).distinct() def filter_parent_uuid(self, queryset, _name, value): if value in ("", "null", "None"):