Skip to content

Commit

Permalink
Fix Error running list_test (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoflemmens authored Mar 11, 2022
1 parent 7232616 commit 7dc3dd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,14 @@ func (c *Client) doRequest(req *http.Request, emptyResponse bool) (interface{},
var values []interface{}
for {
values = append(values, responsePaginated.Values...)
if len(responsePaginated.Next) == 0 {
if responsePaginated.Size/responsePaginated.Pagelen <= responsePaginated.Page {
break
}
newReq, err := http.NewRequest(req.Method, responsePaginated.Next, nil)
if err != nil {
return resBody, err
}
c.authenticateRequest(newReq)
resp, err := c.doRawRequest(newReq, false)
if err != nil {
return resBody, err
Expand Down

0 comments on commit 7dc3dd0

Please sign in to comment.