Fix: API 500 error when project does not exists

This commit is contained in:
tsl0922 2013-03-14 15:02:36 +08:00
parent d1a5e370f3
commit 1e11e45fa3

View file

@ -15,6 +15,7 @@ module Gitlab
key = Key.find(params[:key_id])
project = Project.find_with_namespace(params[:project])
git_cmd = params[:action]
return false unless project
if key.is_deploy_key
project == key.project && git_cmd == 'git-upload-pack'