summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2018-03-26 15:04:34 +0000
committerMarin Jankovski <marin@gitlab.com>2018-03-26 15:04:34 +0000
commit80f7232cbda9fe5ce9d59010845cb0f7ba75c851 (patch)
tree39052727c5a979f102ba108b7e6a4c1263e0f540
parent00d55b7fb054e5a16846ec273ede9a7ffa0a4ed4 (diff)
parent3cefa9ea6d467616360eb38525b34827a80c7cee (diff)
downloadgitlab-ce-80f7232cbda9fe5ce9d59010845cb0f7ba75c851.tar.gz
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
-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?