Commit 80f7232c authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'jej/fix-grape-protected-branch-fallback-removal' into 'master'

[CE] ProtectedBranch API omits empty declared params

See merge request gitlab-org/gitlab-ce!17993
parents 00d55b7f 3cefa9ea
......@@ -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?
......
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