summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 14:32:02 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 14:56:14 +0100
commit3cefa9ea6d467616360eb38525b34827a80c7cee (patch)
treef4bf01ee5ae763780381014865e3b198e25827e7
parentf6eeb1350b93d1cfce401695aa77c8464f26f26b (diff)
downloadgitlab-ce-3cefa9ea6d467616360eb38525b34827a80c7cee.tar.gz
ProtectedBranch API omits empty declared params
-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?