From 61aba4812b58ba1a331d40ae6c213ae1b7d71558 Mon Sep 17 00:00:00 2001 From: Charlie Jacomme Date: Wed, 27 Jun 2018 19:07:00 +0200 Subject: [PATCH] fix list function to follow pages --- re2oapi/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2oapi/client.py b/re2oapi/client.py index 6348c8e..2aa15e4 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 response['next'] is not None and \ + while results['next'] is not None and \ (max_results is None or len(results) < max_results): response = self.get(response['next']) results += response['results']