Commit d330046f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-500-compare' into 'master'

Fix  random 500 error on compare page
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Bug appeared after recent mr !1471  

See merge request !1486
parents 96c2e225 4c43d846
...@@ -170,7 +170,7 @@ module DiffHelper ...@@ -170,7 +170,7 @@ module DiffHelper
def commit_for_diff(diff) def commit_for_diff(diff)
if diff.deleted_file if diff.deleted_file
@merge_request ? @merge_request.commits.last : @commit.parent_id @merge_request ? @merge_request.commits.last : @commit.parents.first
else else
@commit @commit
end end
......
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