提交 a113ce48 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'fix-500-after-merge' into 'master'

Fix 500 on MR diff page after merge and branch was removed

Fixes #1847

See merge request !1345
......@@ -66,7 +66,14 @@ module TreeHelper
end
def edit_blob_link(project, ref, path, options = {})
if project.repository.blob_at(ref, path).text?
blob =
begin
project.repository.blob_at(ref, path)
rescue
nil
end
if blob && blob.text?
text = 'Edit'
after = options[:after] || ''
from_mr = options[:from_merge_request_id]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册