diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-08 12:08:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-08 12:08:30 +0000 |
commit | dd18ae74af0dd661ca3a5ff5458feea925af5ab8 (patch) | |
tree | cf50861ad2b341ba647bc1653b6d3f023d8e116d /lib/gitlab/gitlab_import/importer.rb | |
parent | 7752bfa10fc817c6455f7e287d233fb6cd61a599 (diff) | |
download | gitlab-ce-dd18ae74af0dd661ca3a5ff5458feea925af5ab8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/gitlab_import/importer.rb')
-rw-r--r-- | lib/gitlab/gitlab_import/importer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/gitlab_import/importer.rb b/lib/gitlab/gitlab_import/importer.rb index e84863deba8..0cd33b9f5b7 100644 --- a/lib/gitlab/gitlab_import/importer.rb +++ b/lib/gitlab/gitlab_import/importer.rb @@ -56,8 +56,8 @@ module Gitlab # rubocop: disable CodeReuse/ActiveRecord def gitlab_user_id(project, gitlab_id) - user = User.joins(:identities).find_by("identities.extern_uid = ? AND identities.provider = 'gitlab'", gitlab_id.to_s) - (user && user.id) || project.creator_id + user_id = User.by_provider_and_extern_uid(:gitlab, gitlab_id).select(:id).first&.id + user_id || project.creator_id end # rubocop: enable CodeReuse/ActiveRecord end |