Prevent 500 after merge MR if you check remove source branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
f3d7bf63f1
commit
90ed76ac3c
|
@ -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 New Issue