Fix
This commit is contained in:
parent
cb127ef879
commit
ed1ee3705f
|
|
@ -90,8 +90,9 @@ class Command(BaseCommand):
|
||||||
tag.filter(lower_value=t.tag_value, category=category)
|
tag.filter(lower_value=t.tag_value, category=category)
|
||||||
products = Product.objects.filter(old_id=t.product_id)
|
products = Product.objects.filter(old_id=t.product_id)
|
||||||
if products.exists():
|
if products.exists():
|
||||||
products.tags.add(tag)
|
for p in products.all():
|
||||||
products.save()
|
p.tags.add(tag)
|
||||||
|
p.save()
|
||||||
|
|
||||||
self.stdout.write(self.style.WARNING(f'Add or get tag objects.'))
|
self.stdout.write(self.style.WARNING(f'Add or get tag objects.'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user