From 47070aa4100cb38302b298a2857b4d15c2386841 Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Sat, 4 Aug 2018 13:45:22 +0300 Subject: [PATCH] update --- products/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/utils.py b/products/utils.py index cd665be..900a6af 100644 --- a/products/utils.py +++ b/products/utils.py @@ -1,5 +1,6 @@ from .models import Product + def get_variant_picker_data(product): variants = product.variants.all() variant_attributes = product.attributes.all() @@ -29,11 +30,10 @@ def get_variant_picker_data(product): return data + def expand_categories(categories): products = None for e in categories: if e.name.startswith('None'): products = Product.objects.filter(category=e) return [x for x in categories if not x.name.startswith('None')], products - -