From 3fdf786934e92841f8687cfb1a2f17a2de31640a Mon Sep 17 00:00:00 2001 From: Aurelien Date: Thu, 24 Jan 2019 12:57:31 +0100 Subject: [PATCH] Fix iter_call --- lumapps/client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lumapps/client.py b/lumapps/client.py index 10701693..81a2b60f 100644 --- a/lumapps/client.py +++ b/lumapps/client.py @@ -329,14 +329,12 @@ def iter_call(self, *method_parts, **params): num_retries=self.num_retries ) if "more" in response and "items" not in response: - self.last_cursor = None return # empty list if "more" in response and "items" in response: - if response.get("more", False): - cursor = response["cursor"] - self.last_cursor = cursor for item in response["items"]: yield self._prune(method_parts, item) + if response.get("more", False): + cursor = response["cursor"] else: return else: