diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 06:44:18 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 06:44:18 -0700 |
commit | 9db06da4fa5fc42859dce01a91cc607c7ba9f738 (patch) | |
tree | 3fec2f6e1874520a708fd60e43a1e2bf1e264045 | |
parent | 4daf68b57f92bf697a375ebfa4bc2ebc2e3e0312 (diff) | |
parent | a7de004481967a8f8cd6afae5024408df0a83c1c (diff) | |
download | gitlab-ce-9db06da4fa5fc42859dce01a91cc607c7ba9f738.tar.gz |
Merge pull request #4176 from Andrew8xx8/patch-2
500 error on showing not existed commit fixed
-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] |