fix product type
This commit is contained in:
parent
ec96c32453
commit
352e1bba8a
|
|
@ -14,8 +14,8 @@ class Command(BaseCommand):
|
||||||
subtype, created = ProductType.objects.get_or_create(**{
|
subtype, created = ProductType.objects.get_or_create(**{
|
||||||
'index_name': product_type
|
'index_name': product_type
|
||||||
})
|
})
|
||||||
if created:
|
|
||||||
subtype.name = {settings.FALLBACK_LOCALE: product_type}
|
subtype.name = {settings.FALLBACK_LOCALE: product_type}
|
||||||
subtype.save()
|
subtype.save()
|
||||||
|
if created:
|
||||||
created += 1
|
created += 1
|
||||||
self.stdout.write(self.style.WARNING(f'Created: {create_counter}'))
|
self.stdout.write(self.style.WARNING(f'Created: {create_counter}'))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user