From 8f23d0e69b989e31d0d87f5bcaa33c54a68752cf Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Fri, 16 Sep 2022 10:50:46 +0200 Subject: [PATCH] Make Sytest happy again --- syncapi/routing/search.go | 4 ++++ 1 file changed, 4 insertions(+) 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{