From fe5e344df70c18e0fc7df86b2e65a0789f0854c9 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 20 Oct 2016 20:59:55 +0200 Subject: [PATCH] Status = 1 by default for new products --- .../commands/organization-sync-prestashop-products.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/organization/shop/management/commands/organization-sync-prestashop-products.py b/app/organization/shop/management/commands/organization-sync-prestashop-products.py index 6e059b1a..dbc8bbec 100644 --- a/app/organization/shop/management/commands/organization-sync-prestashop-products.py +++ b/app/organization/shop/management/commands/organization-sync-prestashop-products.py @@ -15,7 +15,7 @@ import cartridge.shop.models as ca_models class Command(BaseCommand): """Synchronize products from PrestaShop to cartridge.shop - + ex: python manage.py organization-sync-prestashop-products -c "Forumnet" """ @@ -78,6 +78,7 @@ class Command(BaseCommand): ca_product.sku = product.reference ca_product.sale_price = product.price + ca_product.status = 1 ca_product.save() prestashop_product, c = os_models.ProductPrestashopProduct.objects.get_or_create(product=ca_product, external_id=product.id_product) -- 2.39.5