Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 15:08:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 15:08:09 +0300
commit0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (patch)
tree64f91b4d4ca74aa09d2a62ac5910820d087ed7cb /lib/gitlab/legacy_github_import
parent6044caed20964a70c1ac6c5a3365d567ed96dfde (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/legacy_github_import')
-rw-r--r--lib/gitlab/legacy_github_import/user_formatter.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/legacy_github_import/user_formatter.rb b/lib/gitlab/legacy_github_import/user_formatter.rb
index 889e6aaa968..e85d1314eda 100644
--- a/lib/gitlab/legacy_github_import/user_formatter.rb
+++ b/lib/gitlab/legacy_github_import/user_formatter.rb
@@ -38,9 +38,8 @@ module Gitlab
identities = ::Identity.arel_table
User.select(:id)
- .joins(:identities).where(identities[:provider].eq(:github)
- .and(identities[:extern_uid].eq(id)))
- .first
+ .joins(:identities)
+ .find_by(identities[:provider].eq(:github).and(identities[:extern_uid].eq(id)))
.try(:id)
end
# rubocop: enable CodeReuse/ActiveRecord