Skip to content
Snippets Groups Projects
Commit 44275e50 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix huge MR exceptions. Fixed link to diff for it

parent 432df031
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment