1
0
Fork 0
mirror of synced 2024-06-01 10:09:49 +12:00

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

fixes #1193 Bug: Search sometimes shows the same snapshot twice
This commit is contained in:
Nick Sweeting 2024-01-19 13:29:25 -08:00 committed by GitHub
commit 22eff07a11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: