Skip to content
Snippets Groups Projects
Commit 3cefa9ea authored by James Edwards-Jones's avatar James Edwards-Jones
Browse files

ProtectedBranch API omits empty declared params

parent f6eeb135
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment