Commit e79ab4bdb92cc645d399a9150f4c7e3b9a5e2e46
Exists in
master
and in
4 other branches
Merge pull request #3209 from tsl0922/master
Fix: API 500 error when project does not exists
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
lib/api/internal.rb
@@ -22,6 +22,7 @@ module Gitlab | @@ -22,6 +22,7 @@ module Gitlab | ||
22 | key = Key.find(params[:key_id]) | 22 | key = Key.find(params[:key_id]) |
23 | project = Project.find_with_namespace(project_path) | 23 | project = Project.find_with_namespace(project_path) |
24 | git_cmd = params[:action] | 24 | git_cmd = params[:action] |
25 | + return false unless project | ||
25 | 26 | ||
26 | 27 | ||
27 | if key.is_deploy_key | 28 | if key.is_deploy_key |