diff options
author | Andrew Kulakov <avk@8xx8.ru> | 2013-06-03 19:04:41 +0400 |
---|---|---|
committer | Andrew Kulakov <avk@8xx8.ru> | 2013-06-03 19:04:41 +0400 |
commit | a7de004481967a8f8cd6afae5024408df0a83c1c (patch) | |
tree | 4512e07dd2ee2acabba057dd21d47db08fa7e678 /app/controllers/commit_controller.rb | |
parent | 0447c731ba392641145ac53cb8c50fab5392cda7 (diff) | |
download | gitlab-ce-a7de004481967a8f8cd6afae5024408df0a83c1c.tar.gz |
500 error on showing not existed commit fixed
Diffstat (limited to 'app/controllers/commit_controller.rb')
-rw-r--r-- | app/controllers/commit_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb index 1329410891d..0f696ef9f5a 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/commit_controller.rb @@ -11,7 +11,11 @@ class CommitController < ProjectResourceController result = CommitLoadContext.new(project, current_user, params).execute @commit = result[:commit] - git_not_found! unless @commit + + if @commit.nil? + git_not_found! + return + end @suppress_diff = result[:suppress_diff] |