summaryrefslogtreecommitdiff
path: root/lib/api/protected_branches.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/protected_branches.rb')
-rw-r--r--lib/api/protected_branches.rb3
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?