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
This commit is contained in:
commit
a113ce48e3
1 changed files with 8 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue