diff options
author | Mark Fletcher <mark@gitlab.com> | 2018-01-04 16:35:44 +0000 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2018-01-21 16:36:55 +0000 |
commit | 062f5b7126978e08522361e879d7c1723b15c9da (patch) | |
tree | 9aee4c80a7803b8f208be8a2be909a6dd3b5da0f /lib/api | |
parent | ee58763158ed10f12a8fe7c089257a532fe6e724 (diff) | |
download | gitlab-ce-062f5b7126978e08522361e879d7c1723b15c9da.tar.gz |
Fix error on empty query for Members API
Diffstat (limited to 'lib/api')
-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 |