From 702b81f9e63b6f6a79945077386f1d321f513ff6 Mon Sep 17 00:00:00 2001 From: Neel Suthar Date: Fri, 19 Jan 2024 13:49:09 -0600 Subject: [PATCH] Fixes #1193 Bug: Search sometimes shows the same snapshot twice Making sure user gets the distinct set of search results --- archivebox/core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/core/views.py b/archivebox/core/views.py index 24035628..6cd146f4 100644 --- a/archivebox/core/views.py +++ b/archivebox/core/views.py @@ -231,7 +231,7 @@ class PublicIndexView(ListView): qs = qs | query_search_index(query) except Exception as err: print(f'[!] Error while using search backend: {err.__class__.__name__} {err}') - return qs + return qs.distinct() def get(self, *args, **kwargs): if PUBLIC_INDEX or self.request.user.is_authenticated: