Commit 3cefa9ea authored by James Edwards-Jones's avatar James Edwards-Jones

ProtectedBranch API omits empty declared params

parent f6eeb135
...@@ -52,7 +52,8 @@ module API ...@@ -52,7 +52,8 @@ module API
conflict!("Protected branch '#{params[:name]}' already exists") conflict!("Protected branch '#{params[:name]}' already exists")
end 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 protected_branch = api_service.create
if protected_branch.persisted? if protected_branch.persisted?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment