summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-01 13:53:15 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-01 13:53:15 +0000
commitd330046fc11b0b7589199be648d09ce6e53ec3e2 (patch)
treed7e92c901c798159b386712657a301ad541aef3a
parent96c2e22549917a32bae03c3c1e850a3225049239 (diff)
parent4c43d846f2c414143a149509961de68b6e341371 (diff)
downloadgitlab-ce-d330046fc11b0b7589199be648d09ce6e53ec3e2.tar.gz
Merge branch 'fix-500-compare' into 'master'
Fix random 500 error on compare page Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Bug appeared after recent mr !1471 See merge request !1486
-rw-r--r--app/helpers/diff_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index 9d718e13b85..b896fba3704 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -170,7 +170,7 @@ module DiffHelper
def commit_for_diff(diff)
if diff.deleted_file
- @merge_request ? @merge_request.commits.last : @commit.parent_id
+ @merge_request ? @merge_request.commits.last : @commit.parents.first
else
@commit
end