Commit 4b3fb68c authored by Stan Hu's avatar Stan Hu

Fix bug in rejecting already added repositories

parent a19a5b57
...@@ -70,7 +70,7 @@ class Import::BitbucketServerController < Import::BaseController ...@@ -70,7 +70,7 @@ class Import::BitbucketServerController < Import::BaseController
@already_added_projects = find_already_added_projects('bitbucket_server') @already_added_projects = find_already_added_projects('bitbucket_server')
already_added_projects_names = @already_added_projects.pluck(:import_source) already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.to_a.reject! { |repo| already_added_projects_names.include?(repo.full_name) } @repos.to_a.reject! { |repo| already_added_projects_names.include?(repo.browse_url) }
rescue *SERVER_ERRORS => e rescue *SERVER_ERRORS => e
flash[:alert] = "Unable to connect to server: #{e}" flash[:alert] = "Unable to connect to server: #{e}"
clear_session_data clear_session_data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment