diff --git a/apps/product/management/commands/add_product_tag.py b/apps/product/management/commands/add_product_tag.py index 9ee09bdd..1ff823b0 100644 --- a/apps/product/management/commands/add_product_tag.py +++ b/apps/product/management/commands/add_product_tag.py @@ -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()