diff options
author | zenati <zenati@informatique.univ-paris-diderot.fr> | 2015-06-09 14:28:11 +0300 |
---|---|---|
committer | zenati <zenati@informatique.univ-paris-diderot.fr> | 2015-06-09 14:42:01 +0300 |
commit | b0de6e9ae27a6364819f47d13d827a8aa253c83e (patch) | |
tree | a6d647652acd7c6e878cbd246488384f792c251a /lib | |
parent | 9562f028594c6d61834d48f75f8379b0de2ba8ae (diff) |
An `in_namespace` scope is already present
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/cleanup.rake | 2 | ||||
-rw-r--r-- | lib/tasks/gitlab/web_hook.rake | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake index 3c9802a0be4..d49cb6778f1 100644 --- a/lib/tasks/gitlab/cleanup.rake +++ b/lib/tasks/gitlab/cleanup.rake @@ -51,7 +51,7 @@ namespace :gitlab do git_base_path = Gitlab.config.gitlab_shell.repos_path all_dirs = Dir.glob(git_base_path + '/*') - global_projects = Project.where(namespace_id: nil).pluck(:path) + global_projects = Project.in_namespace(nil).pluck(:path) puts git_base_path.yellow puts "Looking for global repos to remove... " diff --git a/lib/tasks/gitlab/web_hook.rake b/lib/tasks/gitlab/web_hook.rake index f9f586db93c..412bcad1229 100644 --- a/lib/tasks/gitlab/web_hook.rake +++ b/lib/tasks/gitlab/web_hook.rake @@ -51,11 +51,11 @@ namespace :gitlab do if namespace_path.blank? Project elsif namespace_path == '/' - Project.where(namespace_id: nil) + Project.in_namespace(nil) else namespace = Namespace.where(path: namespace_path).first if namespace - Project.where(namespace_id: namespace.id) + Project.in_namespace(namespace.id) else puts "Namespace not found: #{namespace_path}".red exit 2 |