From 718aeeead819152edfe6f39baf6989e03b9fb4bd Mon Sep 17 00:00:00 2001 From: Antoine Legrand Date: Fri, 17 Mar 2017 16:30:24 +0100 Subject: [PATCH] Fix search group_by clause for PG --- data/model/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/model/repository.py b/data/model/repository.py index fe12ede45..b25ac69ff 100644 --- a/data/model/repository.py +++ b/data/model/repository.py @@ -406,7 +406,7 @@ def _get_sorted_matching_repositories(lookup_value, include_private=False): .select(Repository, Namespace) .join(Namespace, on=(Namespace.id == Repository.namespace_user)) .where(Repository.name.match(lookup_value) | Repository.description.match(lookup_value)) - .group_by(Repository.id)) + .group_by(Repository.id, Namespace.id)) if not include_private: query = query.where(Repository.visibility == _basequery.get_public_repo_visibility())