summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-05-29 13:51:31 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-05-29 13:51:31 -0500
commit4aae86f6f71ab381de1d987a04d5e9c250cd2080 (patch)
tree85766c97afe310da28cab5cf10c88a970cd9a54b /lib/api
parent673a45a14eaf532d96d15d635f526acea81f14b5 (diff)
parent0033e57269518bdaab59c9b841d591176e33b5bc (diff)
downloadgitlab-ce-4aae86f6f71ab381de1d987a04d5e9c250cd2080.tar.gz
Merge remote-tracking branch 'dev/master'
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/deploy_keys.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb
index 70d43ac1d79..b7aadc27e71 100644
--- a/lib/api/deploy_keys.rb
+++ b/lib/api/deploy_keys.rb
@@ -148,10 +148,10 @@ module API
requires :key_id, type: Integer, desc: 'The ID of the deploy key'
end
delete ":id/deploy_keys/:key_id" do
- key = user_project.deploy_keys.find(params[:key_id])
- not_found!('Deploy Key') unless key
+ deploy_key_project = user_project.deploy_keys_projects.find_by(deploy_key_id: params[:key_id])
+ not_found!('Deploy Key') unless deploy_key_project
- destroy_conditionally!(key)
+ destroy_conditionally!(deploy_key_project)
end
end
end