Browse Source

Fixes #1193 Bug: Search sometimes shows the same snapshot twice

Making sure user gets the distinct set of search results
Neel Suthar 1 year ago
parent
commit
702b81f9e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      archivebox/core/views.py

+ 1 - 1
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: