Skip to content

Commit 3ae6de8

Browse files
committed
fix: ensure result_cache is empty before looping
1 parent f7524e8 commit 3ae6de8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tableauserverclient/server/query.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def __init__(self, model: "QuerysetEndpoint[T]") -> None:
4141

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

4648
for page in count(1):
4749
self.request_options.pagenumber = page

0 commit comments

Comments
 (0)