Fix name def
This commit is contained in:
parent
1687e80492
commit
938b9436eb
|
|
@ -149,8 +149,7 @@ class Command(BaseCommand):
|
||||||
tag.label = new_label
|
tag.label = new_label
|
||||||
tag.save()
|
tag.save()
|
||||||
|
|
||||||
|
def check_serial_number(self):
|
||||||
def check_serail_number(self):
|
|
||||||
category = TagCategory.objects.get(index_name='serial_number')
|
category = TagCategory.objects.get(index_name='serial_number')
|
||||||
tags = Tag.objects.filter(category=category, products__isnull=False)
|
tags = Tag.objects.filter(category=category, products__isnull=False)
|
||||||
for tag in tqdm(tags, desc='Update serial number for product'):
|
for tag in tqdm(tags, desc='Update serial number for product'):
|
||||||
|
|
@ -158,8 +157,6 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
self.stdout.write(self.style.WARNING(f'Check serial number product end.'))
|
self.stdout.write(self.style.WARNING(f'Check serial number product end.'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
self.remove_tags_product()
|
self.remove_tags_product()
|
||||||
self.remove_tags()
|
self.remove_tags()
|
||||||
|
|
@ -168,3 +165,4 @@ class Command(BaseCommand):
|
||||||
self.add_tag()
|
self.add_tag()
|
||||||
self.check_tag()
|
self.check_tag()
|
||||||
self.add_product_tag()
|
self.add_product_tag()
|
||||||
|
self.check_serial_number()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user