diff --git a/setup.py b/setup.py index e1ffe3ae..88be23ee 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="tap-shopify", - version="1.4.9", + version="1.4.10", description="Singer.io tap for extracting Shopify data", author="Stitch", url="http://github.com/singer-io/tap-shopify", diff --git a/tap_shopify/streams/inventory_levels.py b/tap_shopify/streams/inventory_levels.py index 78f4e62f..a4d68fb7 100644 --- a/tap_shopify/streams/inventory_levels.py +++ b/tap_shopify/streams/inventory_levels.py @@ -19,13 +19,17 @@ def api_call_for_inventory_levels(self, parent_object_id, bookmark): limit = RESULTS_PER_PAGE, location_ids=parent_object_id ) + + @shopify_error_handling + def get_next_page(self, inventory_page): + return inventory_page.next_page() def get_inventory_levels(self, parent_object, bookmark): inventory_page = self.api_call_for_inventory_levels(parent_object, bookmark) yield from inventory_page while inventory_page.has_next_page(): - inventory_page = inventory_page.next_page() + inventory_page = self.get_next_page(inventory_page) yield from inventory_page def get_objects(self):