Skip to content

Commit

Permalink
Merge pull request #1370 from tableau/1304-improve-pager-error-handling
Browse files Browse the repository at this point in the history
Improve robustness of Pager results
  • Loading branch information
jacalata authored May 23, 2024
2 parents b555528 + 56d55b1 commit 6687d2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tableauserverclient/server/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ def __iter__(self):

# Get the rest on demand as a generator
while self._count < last_pagination_item.total_available:
if len(current_item_list) == 0:
if (
len(current_item_list) == 0
and (last_pagination_item.page_number * last_pagination_item.page_size)
< last_pagination_item.total_available
):
current_item_list, last_pagination_item = self._load_next_page(last_pagination_item)

try:
Expand Down

0 comments on commit 6687d2a

Please sign in to comment.