diff options
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/labels_finder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb index 85ef9bea08d..b8828bcdd32 100644 --- a/app/finders/labels_finder.rb +++ b/app/finders/labels_finder.rb @@ -16,7 +16,7 @@ class LabelsFinder < UnionFinder def label_ids label_ids = [] - label_ids << Label.where(group_id: projects.where.not(group: nil).select(:namespace_id)).select(:id) + label_ids << Label.where(group_id: projects.joins(:namespace).where(namespaces: { type: 'Group' }).select(:namespace_id)).select(:id) label_ids << Label.where(project_id: projects.select(:id)).select(:id) end |