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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 12:10:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 12:10:52 +0300
commita7b422860c90eecd1b98845d234a8347686fbdcf (patch)
treef4a63124ef328ce146a82453b091e10f8189da36 /app/models/preloaders
parentb2362c5f21e373820afc7d7a01ed104eaedd0e49 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/preloaders')
-rw-r--r--app/models/preloaders/project_root_ancestor_preloader.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/preloaders/project_root_ancestor_preloader.rb b/app/models/preloaders/project_root_ancestor_preloader.rb
index 8d04e71774c..1e935249407 100644
--- a/app/models/preloaders/project_root_ancestor_preloader.rb
+++ b/app/models/preloaders/project_root_ancestor_preloader.rb
@@ -21,7 +21,8 @@ module Preloaders
ActiveRecord::Associations::Preloader.new.preload(@projects, :namespace)
@projects.each do |project|
- project.namespace.root_ancestor = root_ancestors_by_id[project.id]&.first
+ root_ancestor = root_ancestors_by_id[project.id]&.first
+ project.namespace.root_ancestor = root_ancestor if root_ancestor.present?
end
end