diff --git a/re2oapi/client.py b/re2oapi/client.py index 2aa15e4..6348c8e 100644 --- a/re2oapi/client.py +++ b/re2oapi/client.py @@ -480,7 +480,7 @@ class Re2oAPIClient: results = response['results'] # Get all next pages and append the results - while results['next'] is not None and \ + while response['next'] is not None and \ (max_results is None or len(results) < max_results): response = self.get(response['next']) results += response['results']