From f96e0c8434699b1644a4ce60e1b2d4b4c095ad4f Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 27 Jun 2017 09:05:20 +0000 Subject: Merge branch '34282-fix-api-using-include_missing-false' into 'master' Fix optional arugments for POST :id/variables Closes #34282 See merge request !12474 --- lib/api/variables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/api/variables.rb b/lib/api/variables.rb index 381c4ef50b0..10374995497 100644 --- a/lib/api/variables.rb +++ b/lib/api/variables.rb @@ -45,7 +45,7 @@ module API optional :protected, type: String, desc: 'Whether the variable is protected' end post ':id/variables' do - variable = user_project.variables.create(declared(params, include_parent_namespaces: false).to_h) + variable = user_project.variables.create(declared_params(include_missing: false)) if variable.valid? present variable, with: Entities::Variable -- cgit v1.2.3