From 1ae6669fbf540af896c728c657e425a691781fdf Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 16 Jan 2024 11:57:40 +0530 Subject: [PATCH] Correctly handle API response when no files to index --- src/khoj/routers/indexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/routers/indexer.py b/src/khoj/routers/indexer.py index cd20ab69..de80aed4 100644 --- a/src/khoj/routers/indexer.py +++ b/src/khoj/routers/indexer.py @@ -148,7 +148,7 @@ async def update( logger.info(f"📪 Content index updated via API call by {client} client") - indexed_filenames = ",".join(file for ctype in index_files for file in index_files[ctype]) + indexed_filenames = ",".join(file for ctype in index_files for file in index_files[ctype]) or "" return Response(content=indexed_filenames, status_code=200)