diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-26 16:57:26 +0000 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-03-03 14:55:22 -0800 |
commit | c0f8b95655a7397925626904b1dd8915ef752fc5 (patch) | |
tree | 56262f0cf0faeaa6327633587d69a5c125018ee6 /app | |
parent | d59d4d41455d5f27aaa8dcd458dc4c746506a6cc (diff) | |
download | gitlab-ce-c0f8b95655a7397925626904b1dd8915ef752fc5.tar.gz |
Merge branch 'fix_gitlab_importer' into 'master'
Fix GitLab && Gitorious importers. Hide already imported projects
Fixes #2060
See merge request !1594
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/import/gitlab_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/import/gitorious_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/import/gitlab_controller.rb b/app/controllers/import/gitlab_controller.rb index a51ea36aff8..c18178abf76 100644 --- a/app/controllers/import/gitlab_controller.rb +++ b/app/controllers/import/gitlab_controller.rb @@ -16,7 +16,7 @@ class Import::GitlabController < Import::BaseController @already_added_projects = current_user.created_projects.where(import_type: "gitlab") already_added_projects_names = @already_added_projects.pluck(:import_source) - @repos.to_a.reject!{ |repo| already_added_projects_names.include? repo["path_with_namespace"] } + @repos = @repos.to_a.reject{ |repo| already_added_projects_names.include? repo["path_with_namespace"] } end def jobs diff --git a/app/controllers/import/gitorious_controller.rb b/app/controllers/import/gitorious_controller.rb index 627b4a171b8..6067a87ee04 100644 --- a/app/controllers/import/gitorious_controller.rb +++ b/app/controllers/import/gitorious_controller.rb @@ -15,7 +15,7 @@ class Import::GitoriousController < Import::BaseController @already_added_projects = current_user.created_projects.where(import_type: "gitorious") already_added_projects_names = @already_added_projects.pluck(:import_source) - @repos.to_a.reject! { |repo| already_added_projects_names.include? repo.full_name } + @repos.reject! { |repo| already_added_projects_names.include? repo.full_name } end def jobs |