From dac520ba03431af8811ec26776e77d64ab663141 Mon Sep 17 00:00:00 2001 From: Christian Duvholt Date: Tue, 22 Nov 2016 15:39:47 +0100 Subject: [PATCH] Fix duplicate search results --- wiki/views/article.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/views/article.py b/wiki/views/article.py index aa222887..1cb1f72c 100644 --- a/wiki/views/article.py +++ b/wiki/views/article.py @@ -595,7 +595,7 @@ class SearchView(ListView): if not permissions.can_moderate( models.URLPath.root().article, self.request.user): - articles = articles.active().can_read(self.request.user) + articles = articles.active().can_read(self.request.user).distinct() return articles def get_context_data(self, **kwargs): -- 2.45.2