Commit 44275e50 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix huge MR exceptions. Fixed link to diff for it

parent 432df031
......@@ -214,9 +214,9 @@ class MergeRequest < ActiveRecord::Base
end
def dump_diffs(diffs)
if broken_diffs?
if diffs == broken_diffs
broken_diffs
else
elsif diffs.respond_to?(:map)
diffs.map(&:to_hash)
end
end
......@@ -224,7 +224,7 @@ class MergeRequest < ActiveRecord::Base
def load_diffs(raw)
if raw == broken_diffs
broken_diffs
else
elsif raw.respond_to?(:map)
raw.map { |hash| Gitlab::Git::Diff.new(hash) }
end
end
......
......@@ -4,7 +4,7 @@
%h4.nothing_here_message
Can't load diff.
You can
= link_to "download it", project_merge_request_path(@project, @merge_request), format: :diff, class: "vlink"
= link_to "download it", project_merge_request_path(@project, @merge_request, format: :diff), class: "vlink"
instead.
- else
%h4.nothing_here_message Nothing to merge
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