From 9fcaa6747a50dd878b801553a77a5882f0595964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=20=D0=93=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=BA=D0=B8=D1=85?= Date: Wed, 13 Nov 2019 11:41:58 +0300 Subject: [PATCH] Fix tag category add --- apps/product/management/commands/add_product_tag.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/product/management/commands/add_product_tag.py b/apps/product/management/commands/add_product_tag.py index 5633230c..8b6ef85f 100644 --- a/apps/product/management/commands/add_product_tag.py +++ b/apps/product/management/commands/add_product_tag.py @@ -27,8 +27,7 @@ class Command(BaseCommand): def add_category_tag(self): objects = [] for c in tqdm(self.category_sql(), desc='Add category tags'): - categories = TagCategory.objects.filter(index_name=c.category, - value_type=c.value_type + categories = TagCategory.objects.filter(index_name=c.category ) if not categories.exists(): objects.append( @@ -112,5 +111,5 @@ class Command(BaseCommand): def handle(self, *args, **kwargs): self.add_category_tag() self.add_tag() + self.check_tag() self.add_product_tag() - self.check_tag() \ No newline at end of file