Fix
This commit is contained in:
parent
4f6cbe9297
commit
2abb474221
|
|
@ -4,7 +4,6 @@ from establishment.management.commands.add_position import namedtuplefetchall
|
||||||
from tag.models import Tag, TagCategory
|
from tag.models import Tag, TagCategory
|
||||||
from product.models import Product
|
from product.models import Product
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from django.db.models.functions import Lower
|
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
|
|
@ -72,7 +71,6 @@ class Command(BaseCommand):
|
||||||
qs = tags.filter(old_id_meta_product__isnull=True)\
|
qs = tags.filter(old_id_meta_product__isnull=True)\
|
||||||
.update(old_id_meta_product=t.old_id)
|
.update(old_id_meta_product=t.old_id)
|
||||||
|
|
||||||
|
|
||||||
Tag.objects.bulk_create(objects)
|
Tag.objects.bulk_create(objects)
|
||||||
self.stdout.write(self.style.WARNING(f'Add or get tag objects.'))
|
self.stdout.write(self.style.WARNING(f'Add or get tag objects.'))
|
||||||
|
|
||||||
|
|
@ -112,7 +110,6 @@ class Command(BaseCommand):
|
||||||
tag.label = new_label
|
tag.label = new_label
|
||||||
tag.save()
|
tag.save()
|
||||||
|
|
||||||
|
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
self.add_category_tag()
|
self.add_category_tag()
|
||||||
self.add_tag()
|
self.add_tag()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user