diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-26 14:32:02 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-26 14:56:14 +0100 |
commit | 3cefa9ea6d467616360eb38525b34827a80c7cee (patch) | |
tree | f4bf01ee5ae763780381014865e3b198e25827e7 /lib/api/protected_branches.rb | |
parent | f6eeb1350b93d1cfce401695aa77c8464f26f26b (diff) | |
download | gitlab-ce-3cefa9ea6d467616360eb38525b34827a80c7cee.tar.gz |
ProtectedBranch API omits empty declared params
Diffstat (limited to 'lib/api/protected_branches.rb')
-rw-r--r-- | lib/api/protected_branches.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/protected_branches.rb b/lib/api/protected_branches.rb index c65105ff8b0..33321db46e9 100644 --- a/lib/api/protected_branches.rb +++ b/lib/api/protected_branches.rb @@ -52,7 +52,8 @@ module API conflict!("Protected branch '#{params[:name]}' already exists") end - api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared(params)) + declared_params = declared_params(include_missing: false) + api_service = ::ProtectedBranches::ApiService.new(user_project, current_user, declared_params) protected_branch = api_service.create if protected_branch.persisted? |