Commit a7de0044 authored by Andrew Kulakov's avatar Andrew Kulakov

500 error on showing not existed commit fixed

parent 0447c731
...@@ -11,7 +11,11 @@ class CommitController < ProjectResourceController ...@@ -11,7 +11,11 @@ class CommitController < ProjectResourceController
result = CommitLoadContext.new(project, current_user, params).execute result = CommitLoadContext.new(project, current_user, params).execute
@commit = result[:commit] @commit = result[:commit]
git_not_found! unless @commit
if @commit.nil?
git_not_found!
return
end
@suppress_diff = result[:suppress_diff] @suppress_diff = result[:suppress_diff]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment