diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 18:07:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-13 18:07:43 +0300 |
commit | 7eca3f56625526ffa7f263c1fef0fcea34de8ca6 (patch) | |
tree | fec87c2a902e3c44f89963f4b28e6de32c0806f3 /app/models/namespace.rb | |
parent | 988424215cf104d9ee24bb1751141424cffb32d1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index c9254aa432f..fcd641671f5 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -242,11 +242,11 @@ class Namespace < ApplicationRecord return unless host.ends_with?(gitlab_host) name = host.delete_suffix(gitlab_host) - Namespace.where(parent_id: nil).by_path(name) + Namespace.top_most.by_path(name) end def top_most - where(parent_id: nil) + by_parent(nil) end end |