diff options
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 |