Fix name def
This commit is contained in:
parent
1687e80492
commit
938b9436eb
|
|
@ -149,8 +149,7 @@ class Command(BaseCommand):
|
|||
tag.label = new_label
|
||||
tag.save()
|
||||
|
||||
|
||||
def check_serail_number(self):
|
||||
def check_serial_number(self):
|
||||
category = TagCategory.objects.get(index_name='serial_number')
|
||||
tags = Tag.objects.filter(category=category, products__isnull=False)
|
||||
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.'))
|
||||
|
||||
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
self.remove_tags_product()
|
||||
self.remove_tags()
|
||||
|
|
@ -168,3 +165,4 @@ class Command(BaseCommand):
|
|||
self.add_tag()
|
||||
self.check_tag()
|
||||
self.add_product_tag()
|
||||
self.check_serial_number()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user