Merge branch 'fix_gitlab_importer' into 'master'

Fix GitLab && Gitorious importers. Hide already imported projects

Fixes #2060

See merge request !1594
This commit is contained in:
Dmitriy Zaporozhets 2015-02-26 16:57:26 +00:00
commit f980827ba6
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,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

View File

@ -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