Skip to content

Commit

Permalink
Recommended rearrangement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Schalk1e committed May 20, 2024
1 parent 88bb0d5 commit 232e682
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/api/aaq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def get_paginated(
response.raise_for_status()
result = response.json()["result"]
response_list.extend(result)
if len(result) == params["limit"]:
params["offset"] += params["limit"]
elif len(result) < params["limit"]:
if len(result) < limit:
break
else:
params["offset"] += limit


response_list = [{k: str(v) for k, v in d.items()} for d in response_list]

Expand Down

0 comments on commit 232e682

Please sign in to comment.