Commit 1e11e45fa372f093352774a3fa1725ff143ed746

Authored by tsl0922
1 parent d1a5e370

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
... ... @@ -15,6 +15,7 @@ module Gitlab
15 15 key = Key.find(params[:key_id])
16 16 project = Project.find_with_namespace(params[:project])
17 17 git_cmd = params[:action]
  18 + return false unless project
18 19  
19 20 if key.is_deploy_key
20 21 project == key.project && git_cmd == 'git-upload-pack'
... ...