From 3cefa9ea6d467616360eb38525b34827a80c7cee Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Mon, 26 Mar 2018 14:32:02 +0100 Subject: ProtectedBranch API omits empty declared params --- lib/api/protected_branches.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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? -- cgit v1.2.1