Skip to content

Commit

Permalink
Merge pull request #28 from lumapps/rework-project-structure
Browse files Browse the repository at this point in the history
Fix iter_call
  • Loading branch information
ulodciv authored Jan 24, 2019
2 parents b313544 + 9f9d672 commit 82fb85c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lumapps/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 82fb85c

Please sign in to comment.