Skip to content

Commit 7dc3dd0

Browse files
Fix Error running list_test (ktrysmt#186)
1 parent 7232616 commit 7dc3dd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,14 @@ func (c *Client) doRequest(req *http.Request, emptyResponse bool) (interface{},
320320
var values []interface{}
321321
for {
322322
values = append(values, responsePaginated.Values...)
323-
if len(responsePaginated.Next) == 0 {
323+
if responsePaginated.Size/responsePaginated.Pagelen <= responsePaginated.Page {
324324
break
325325
}
326326
newReq, err := http.NewRequest(req.Method, responsePaginated.Next, nil)
327327
if err != nil {
328328
return resBody, err
329329
}
330+
c.authenticateRequest(newReq)
330331
resp, err := c.doRawRequest(newReq, false)
331332
if err != nil {
332333
return resBody, err

0 commit comments

Comments
 (0)