Commit a7de004481967a8f8cd6afae5024408df0a83c1c
1 parent
0447c731
Exists in
master
and in
4 other branches
500 error on showing not existed commit fixed
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/controllers/commit_controller.rb
| @@ -11,7 +11,11 @@ class CommitController < ProjectResourceController | @@ -11,7 +11,11 @@ class CommitController < ProjectResourceController | ||
| 11 | result = CommitLoadContext.new(project, current_user, params).execute | 11 | result = CommitLoadContext.new(project, current_user, params).execute |
| 12 | 12 | ||
| 13 | @commit = result[:commit] | 13 | @commit = result[:commit] |
| 14 | - git_not_found! unless @commit | 14 | + |
| 15 | + if @commit.nil? | ||
| 16 | + git_not_found! | ||
| 17 | + return | ||
| 18 | + end | ||
| 15 | 19 | ||
| 16 | @suppress_diff = result[:suppress_diff] | 20 | @suppress_diff = result[:suppress_diff] |
| 17 | 21 |