Save shop name if different
This commit is contained in:
parent
9693aaddac
commit
dfb6bb7de7
|
@ -18,7 +18,9 @@ class Command(BaseCommand):
|
||||||
item_id=product['shop_product_id'],
|
item_id=product['shop_product_id'],
|
||||||
shop__flag_code=region[0]
|
shop__flag_code=region[0]
|
||||||
)
|
)
|
||||||
amiibo_shop.shop_name = product['title']
|
if amiibo_shop.shop_name != product['title']:
|
||||||
|
amiibo_shop.shop_name = product['title']
|
||||||
|
amiibo_shop.save()
|
||||||
amiibo_shop.update_price(product['price'], product['currency'])
|
amiibo_shop.update_price(product['price'], product['currency'])
|
||||||
|
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
|
@ -37,4 +39,4 @@ class Command(BaseCommand):
|
||||||
for product in products:
|
for product in products:
|
||||||
self.update_product(product, region)
|
self.update_product(product, region)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
self.update_product(product, region)
|
self.update_product(product, region)
|
Loading…
Reference in New Issue