From 9e289611ab9f7fffba8bdb828ba27755690eb669 Mon Sep 17 00:00:00 2001 From: Alexander Sfakianos Date: Mon, 10 Aug 2020 19:29:38 +0000 Subject: [PATCH] Amended pull request #389 to allow saving of products with no variants --- shopify/resources/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shopify/resources/product.py b/shopify/resources/product.py index e08c1086..b8bc3c70 100644 --- a/shopify/resources/product.py +++ b/shopify/resources/product.py @@ -36,7 +36,7 @@ def save(self): api_version = ShopifyResource.version if api_version and ( api_version.strip('-') >= start_api_version) and api_version != 'unstable': - if 'variants' in self.product.attributes: + if 'variants' in self.attributes: for variant in self.variants: if 'inventory_quantity' in variant.attributes: del variant.attributes['inventory_quantity']