summaryrefslogtreecommitdiff
path: root/lib/api/variables.rb
diff options
context:
space:
mode:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-04-18 09:19:40 +0000
committerRémy Coutable <remy@rymai.me>2018-04-18 09:19:40 +0000
commitc6b1043e9d1b7fe9912c330b6e7d4342f2a9694e (patch)
tree45c3fd39c83122eb602f217501924bc8d6899987 /lib/api/variables.rb
parent3529ccae9e3a484da5a4fba32bfdf0317f289363 (diff)
downloadgitlab-ce-c6b1043e9d1b7fe9912c330b6e7d4342f2a9694e.tar.gz
Resolve "Make a Rubocop that forbids returning from a block"
Diffstat (limited to 'lib/api/variables.rb')
-rw-r--r--lib/api/variables.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index d08876ae1b9..a34de9410e8 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -31,7 +31,7 @@ module API
key = params[:key]
variable = user_project.variables.find_by(key: key)
- return not_found!('Variable') unless variable
+ break not_found!('Variable') unless variable
present variable, with: Entities::Variable
end
@@ -67,7 +67,7 @@ module API
put ':id/variables/:key' do
variable = user_project.variables.find_by(key: params[:key])
- return not_found!('Variable') unless variable
+ break not_found!('Variable') unless variable
variable_params = declared_params(include_missing: false).except(:key)