Fix: API 500 error when project does not exists
This commit is contained in:
parent
d1a5e370f3
commit
1e11e45fa3
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ module Gitlab
|
||||||
key = Key.find(params[:key_id])
|
key = Key.find(params[:key_id])
|
||||||
project = Project.find_with_namespace(params[:project])
|
project = Project.find_with_namespace(params[:project])
|
||||||
git_cmd = params[:action]
|
git_cmd = params[:action]
|
||||||
|
return false unless project
|
||||||
|
|
||||||
if key.is_deploy_key
|
if key.is_deploy_key
|
||||||
project == key.project && git_cmd == 'git-upload-pack'
|
project == key.project && git_cmd == 'git-upload-pack'
|
||||||
|
|
Loading…
Reference in a new issue