Skip to content

Commit 37ee500

Browse files
authored
Merge pull request #2 from cloudshiftstrategies/fix/pagination
fix(client): pagination
2 parents d1c42e1 + 0bd0dc3 commit 37ee500

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

channel_advisor_api/models/channel_advisor_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def get_all_pages(self, url: str, limit: int = None) -> List[dict]:
116116
query_params["$top"] = [limit]
117117
next_link = parsed_url._replace(query=urlencode(query_params, doseq=True)).geturl()
118118
while next_link:
119+
next_link = next_link.replace(ChannelAdvisorClient.CA_ENDPOINT, "")
119120
response = self.request("get", next_link)
120121
if not response:
121122
logger.warning(f"Request get {next_link} returned None. Breaking loop")

0 commit comments

Comments
 (0)