From fb67d6684c4ba229450767ab8afef2a7b158cd99 Mon Sep 17 00:00:00 2001 From: JDC Date: Thu, 19 Nov 2020 21:53:22 -0500 Subject: [PATCH] fix: Return empty QuerySet instead of list --- archivebox/search/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/search/__init__.py b/archivebox/search/__init__.py index 15efffb0..2a1f4dcd 100644 --- a/archivebox/search/__init__.py +++ b/archivebox/search/__init__.py @@ -51,7 +51,7 @@ def query_search_index(query: str, out_dir: Path=OUTPUT_DIR) -> QuerySet: qsearch = Snapshot.objects.filter(pk__in=snapshot_ids) return qsearch else: - return [] + return Snapshot.objects.none() @enforce_types def flush_search_index(snapshots: QuerySet):