Skip to content

Commit

Permalink
πŸ› fix pagination logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelleinio authored Oct 17, 2024
1 parent 4750c1f commit 203bcc1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sageintacctsdk/apis/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,10 @@ def get_all(self, field: str = None, value: str = None, fields: list = None):
}

response = self.format_and_send_request(data)['data']
if self.__dimension in response:
paginated_data = response[self.__dimension]
complete_data.extend(paginated_data)

break
if self.__dimension not in response:
break
paginated_data = response[self.__dimension]
complete_data.extend(paginated_data)

return complete_data

Expand Down

0 comments on commit 203bcc1

Please sign in to comment.