diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 00:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 00:08:51 +0300 |
commit | 9613d93025008a5326ddb624e2909feaa87e7977 (patch) | |
tree | 0a48921271f5ad0a31433626325f54b691d10fd6 /app/services/members | |
parent | 6f05d35c3160e3a442b40d6af1e8e584747080b3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/members')
-rw-r--r-- | app/services/members/create_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/members/create_service.rb b/app/services/members/create_service.rb index 8f7b63c32c8..8485e7cbafa 100644 --- a/app/services/members/create_service.rb +++ b/app/services/members/create_service.rb @@ -46,9 +46,11 @@ module Members :tasks_to_be_done_members, :member_created_member_task_id def invites_from_params - return params[:user_ids] if params[:user_ids].is_a?(Array) + # String, Nil, Array, Integer + return params[:user_id] if params[:user_id].is_a?(Array) + return [] unless params[:user_id] - params[:user_ids]&.to_s&.split(',')&.uniq&.flatten || [] + params[:user_id].to_s.split(',').uniq end def validate_invite_source! |