Fix huge MR exceptions. Fixed link to diff for it

This commit is contained in:
Dmitriy Zaporozhets 2013-05-22 14:06:08 +03:00
parent 432df031cf
commit 44275e5066
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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