Commit 83d7a7a8 authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch...

Merge branch '355996-follow-up-from-bulk-adding-members-needs-to-consider-user-records-as-well-as-the-ids' into 'master'

Create a scope for members by user

See merge request gitlab-org/gitlab!83134
parents 435ea6c8 bf3e5072
......@@ -53,7 +53,7 @@ module Members
if users.present?
# helps not have to perform another query per user id to see if the member exists later on when fetching
existing_members = source.members_and_requesters.where(user_id: users).index_by(&:user_id) # rubocop:disable CodeReuse/ActiveRecord
existing_members = source.members_and_requesters.with_user(users).index_by(&:user_id)
end
[emails, users, existing_members]
......
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