Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-07-05 14:52:02 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-07-05 14:52:02 +0300
commit3bf7444ebd41b243dc471815252138d921ee0379 (patch)
tree8d08d096e4c6fdf0fc241bee489d5031962dfb55 /lib/gitlab/background_migration
parent1f320d1c50ed5001d915dbaece670664f242691d (diff)
Restrict group scope
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/fix_cross_project_label_links.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/fix_cross_project_label_links.rb b/lib/gitlab/background_migration/fix_cross_project_label_links.rb
index 8a50b15cfae..987bb39a561 100644
--- a/lib/gitlab/background_migration/fix_cross_project_label_links.rb
+++ b/lib/gitlab/background_migration/fix_cross_project_label_links.rb
@@ -33,7 +33,7 @@ module Gitlab
# To isolate migration code, we avoid usage of
# Gitlab::GroupHierarchy#base_and_descendants which already
# does this job better
- ids = Namespace.where(type: 'Group', id: start_id..stop_id).pluck(:id)
+ ids = Namespace.where(type: 'Group', id: Label.where(type: 'GroupLabel').select('distinct group_id')).where(id: start_id..stop_id).pluck(:id)
group_ids = ids
GROUP_NESTED_LEVEL.times do