From 9c6f0487950f1b510d7222885ed8591607b4fe9b Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 25 Feb 2015 12:18:15 +0200 Subject: Fix GitLab importer. Hide already imported projects --- app/controllers/import/gitlab_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1 From 00c631573f1f7564cfd8d823dce761fc6c76e2bc Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 25 Feb 2015 15:16:24 +0100 Subject: Fix Gitorious import status page hiding of already added projects. --- app/controllers/import/gitorious_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1