diff --git a/cmd/tools/rest/rest.go b/cmd/tools/rest/rest.go index e569ae9ba..d0b21d83b 100644 --- a/cmd/tools/rest/rest.go +++ b/cmd/tools/rest/rest.go @@ -483,15 +483,12 @@ func FetchAllStream(client *Client, href string, processBatch func([]gjson.Resul output := gjson.ParseBytes(response) data := output.Get("records") - numRecords := output.Get("num_records") next := output.Get("_links.next.href") if data.Exists() { - if numRecords.Int() > 0 { - // Process the current batch of records - if err := processBatch(data.Array()); err != nil { - return err - } + // Process the current batch of records + if err := processBatch(data.Array()); err != nil { + return err } prevLink = nextLink