Skip to content

Commit

Permalink
fix: ensure result_cache is empty before looping
Browse files Browse the repository at this point in the history
  • Loading branch information
jorwoods committed Jun 17, 2024
1 parent f7524e8 commit 3ae6de8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tableauserverclient/server/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def __init__(self, model: "QuerysetEndpoint[T]") -> None:

def __iter__(self) -> Iterator[T]:
# Not built to be re-entrant. Starts back at page 1, and empties
# the result cache.
# the result cache. Ensure the result_cache is empty to not yield
# items from prior usage.
self._result_cache = []

for page in count(1):
self.request_options.pagenumber = page
Expand Down

0 comments on commit 3ae6de8

Please sign in to comment.