diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-22 15:27:15 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-22 15:27:15 +0000 |
commit | c4904d570c2c5094d2d2bfee5d243b39556fdc89 (patch) | |
tree | dab12bae640f5e84f2eb4973e1bce76ed9f1baca /lib | |
parent | 834dee687833fa7beca67e47a216261b23faa66b (diff) | |
parent | 580fa6becf28670c77529993a08fcd0f22491153 (diff) | |
download | gitlab-ce-c4904d570c2c5094d2d2bfee5d243b39556fdc89.tar.gz |
Merge branch '41673-blank-query-members-api' into 'master'
Resolve "Project/#/Members?query= blank causes 500 error"
Closes #41673
See merge request gitlab-org/gitlab-ce!16235
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/members.rb | 2 | ||||
-rw-r--r-- | lib/api/v3/members.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/members.rb b/lib/api/members.rb index 5446f6b54b1..130c6d6da71 100644 --- a/lib/api/members.rb +++ b/lib/api/members.rb @@ -22,7 +22,7 @@ module API source = find_source(source_type, params[:id]) users = source.users - users = users.merge(User.search(params[:query])) if params[:query] + users = users.merge(User.search(params[:query])) if params[:query].present? present paginate(users), with: Entities::Member, source: source end diff --git a/lib/api/v3/members.rb b/lib/api/v3/members.rb index de226e4e573..46145cac7a5 100644 --- a/lib/api/v3/members.rb +++ b/lib/api/v3/members.rb @@ -23,7 +23,7 @@ module API source = find_source(source_type, params[:id]) users = source.users - users = users.merge(User.search(params[:query])) if params[:query] + users = users.merge(User.search(params[:query])) if params[:query].present? present paginate(users), with: ::API::Entities::Member, source: source end |