From 9a0f7fec7ec26aeedee824e65556b1624ea58546 Mon Sep 17 00:00:00 2001 From: Yashaskara Jois K R <43381463+Yashaskara@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:16:53 +0530 Subject: [PATCH 1/2] Removed removal of Quantity for versions above 2019 --- shopify/resources/product.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shopify/resources/product.py b/shopify/resources/product.py index cc16e3e3..2779dc73 100644 --- a/shopify/resources/product.py +++ b/shopify/resources/product.py @@ -33,11 +33,11 @@ def add_variant(self, variant): def save(self): start_api_version = "201910" api_version = ShopifyResource.version - if api_version and (api_version.strip("-") >= start_api_version) and api_version != "unstable": - if "variants" in self.attributes: - for variant in self.variants: - if "inventory_quantity" in variant.attributes: - del variant.attributes["inventory_quantity"] - if "old_inventory_quantity" in variant.attributes: - del variant.attributes["old_inventory_quantity"] +# if api_version and (api_version.strip("-") >= start_api_version) and api_version != "unstable": +# if "variants" in self.attributes: +# for variant in self.variants: +# if "inventory_quantity" in variant.attributes: +# del variant.attributes["inventory_quantity"] +# if "old_inventory_quantity" in variant.attributes: +# del variant.attributes["old_inventory_quantity"] return super(ShopifyResource, self).save() From 7a9750e0d68d23ffb0c98c23779f56b79cb76b3a Mon Sep 17 00:00:00 2001 From: Yashaskara Jois K R <43381463+Yashaskara@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:48:39 +0530 Subject: [PATCH 2/2] Update product.py --- shopify/resources/product.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/shopify/resources/product.py b/shopify/resources/product.py index 2779dc73..bf3a39d3 100644 --- a/shopify/resources/product.py +++ b/shopify/resources/product.py @@ -33,11 +33,4 @@ def add_variant(self, variant): def save(self): start_api_version = "201910" api_version = ShopifyResource.version -# if api_version and (api_version.strip("-") >= start_api_version) and api_version != "unstable": -# if "variants" in self.attributes: -# for variant in self.variants: -# if "inventory_quantity" in variant.attributes: -# del variant.attributes["inventory_quantity"] -# if "old_inventory_quantity" in variant.attributes: -# del variant.attributes["old_inventory_quantity"] return super(ShopifyResource, self).save()