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)
|
||||
products = Product.objects.filter(old_id=t.product_id)
|
||||
if products.exists():
|
||||
products.tags.add(tag)
|
||||
products.save()
|
||||
for p in products.all():
|
||||
p.tags.add(tag)
|
||||
p.save()
|
||||
|
||||
self.stdout.write(self.style.WARNING(f'Add or get tag objects.'))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user