Check serial number command

This commit is contained in:
Виктор Гладких 2019-11-21 15:26:43 +03:00
parent 5236bca874
commit 26b8dcd082

View File

@ -12,6 +12,7 @@ class Command(BaseCommand):
tags = Tag.objects.filter(category=category, products__isnull=False)
for tag in tqdm(tags, desc='Update serial number for product'):
tag.products.all().update(serial_number=tag.value)
tag.products.clear()
self.stdout.write(self.style.WARNING(f'Check serial number product end.'))