diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-05 19:10:25 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-05 19:10:25 +0300 |
commit | 7cefd9c6ef4fbbd8eb297ac03e2fa3e43c44f1a1 (patch) | |
tree | 9574a34293a171d53d9b7de94e3b3add2b8709de /app/views/projects/merge_requests | |
parent | eb12e3ab56eecb05ea2847b414554266cfb2947c (diff) |
Prevent 500 on MR page if merge_event missing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/merge_requests')
-rw-r--r-- | app/views/projects/merge_requests/show/_state_widget.html.haml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/merge_requests/show/_state_widget.html.haml b/app/views/projects/merge_requests/show/_state_widget.html.haml index f909948995c..a4f2a890969 100644 --- a/app/views/projects/merge_requests/show/_state_widget.html.haml +++ b/app/views/projects/merge_requests/show/_state_widget.html.haml @@ -19,8 +19,10 @@ - if @merge_request.merged? %h4 - Merged by #{link_to_member(@project, @merge_request.merge_event.author, avatar: false)} - #{time_ago_with_tooltip(@merge_request.merge_event.created_at)} + Merged + - if @merge_request.merge_event + by #{link_to_member(@project, @merge_request.merge_event.author, avatar: false)} + #{time_ago_with_tooltip(@merge_request.merge_event.created_at)} = render "projects/merge_requests/show/remove_source_branch" - if @merge_request.locked? @@ -46,4 +48,3 @@ Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'} = succeed '.' do != gfm(issues_sentence(@closes_issues)) - |