Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Don't try and update an empty list of URLs

Daoud Clarkebd0cc3863e7f
diff --git a/mwmbl/indexer/indexdb.py b/mwmbl/indexer/indexdb.py
index b31f097..449f3bd 100644
--- a/mwmbl/indexer/indexdb.py
+++ b/mwmbl/indexer/indexdb.py
@@ -59,6 +59,9 @@ class IndexDatabase:
return [BatchInfo(url, user_id_hash, status) for url, user_id_hash, status in results]
def update_batch_status(self, batch_urls: list[str], status: BatchStatus):
+ if not batch_urls:
+ return
+
sql = """
UPDATE batches SET status = %(status)s
WHERE url IN %(urls)s