diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 15:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 15:08:09 +0300 |
commit | 0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (patch) | |
tree | 64f91b4d4ca74aa09d2a62ac5910820d087ed7cb /lib/gitlab/legacy_github_import/user_formatter.rb | |
parent | 6044caed20964a70c1ac6c5a3365d567ed96dfde (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/legacy_github_import/user_formatter.rb')
-rw-r--r-- | lib/gitlab/legacy_github_import/user_formatter.rb | 5 |
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 |