fix list function to follow pages

This commit is contained in:
Charlie Jacomme 2018-06-27 19:07:00 +02:00
parent b0885f7b84
commit 61aba4812b

View file

@ -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']