From 5e4b672465b8d0f79c4437865e95364eb3f6b175 Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Tue, 13 Feb 2018 22:49:57 +0100 Subject: Use UNION ALL instead of UNION on the recursive query for nested namespaces --- lib/gitlab/group_hierarchy.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/group_hierarchy.rb b/lib/gitlab/group_hierarchy.rb index 42ded7c286f..73a190cd78c 100644 --- a/lib/gitlab/group_hierarchy.rb +++ b/lib/gitlab/group_hierarchy.rb @@ -85,7 +85,8 @@ module Gitlab descendants_table = descendants.alias_to(groups_table) union = SQL::Union.new([model.unscoped.from(ancestors_table), - model.unscoped.from(descendants_table)]) + model.unscoped.from(descendants_table)], + remove_duplicates: false) relation = model .unscoped -- cgit v1.2.1