diff --git a/syncapi/routing/search.go b/syncapi/routing/search.go index 59207a999..341efeb14 100644 --- a/syncapi/routing/search.go +++ b/syncapi/routing/search.go @@ -222,6 +222,10 @@ func Search(req *http.Request, device *api.Device, syncDB storage.Database, fts if int(result.Total) > nextBatch+len(results) { nb := strconv.Itoa(len(results) + nextBatch) nextBatchResult = &nb + } else if int(result.Total) == nextBatch+len(results) { + // Sytest expects a next_batch even if we don't actually have any more results + nb := "" + nextBatchResult = &nb } res := SearchResponse{