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:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/namespace.rb2
-rw-r--r--app/models/user.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 397dc7a25ab..d6b0ab0e52c 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -46,7 +46,7 @@ class Namespace < ActiveRecord::Base
before_destroy(prepend: true) { prepare_for_destroy }
after_destroy :rm_dir
- scope :root, -> { where('type IS NULL') }
+ scope :for_user, -> { where('type IS NULL') }
scope :with_statistics, -> do
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')
diff --git a/app/models/user.rb b/app/models/user.rb
index 4e5f94683b8..3228081a999 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -338,7 +338,7 @@ class User < ActiveRecord::Base
end
def find_by_full_path(path, follow_redirects: false)
- namespace = Namespace.find_by_full_path(path, follow_redirects: follow_redirects)
+ namespace = Namespace.for_user.find_by_full_path(path, follow_redirects: follow_redirects)
namespace&.owner
end