Check serial number command
This commit is contained in:
parent
5236bca874
commit
26b8dcd082
|
|
@ -12,6 +12,7 @@ class Command(BaseCommand):
|
||||||
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'):
|
||||||
tag.products.all().update(serial_number=tag.value)
|
tag.products.all().update(serial_number=tag.value)
|
||||||
|
tag.products.clear()
|
||||||
|
|
||||||
self.stdout.write(self.style.WARNING(f'Check serial number product end.'))
|
self.stdout.write(self.style.WARNING(f'Check serial number product end.'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user