Commit 90ed76ac authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent 500 after merge MR if you check remove source branch

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f3d7bf63
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment