From 2d076394aa9e39fc1b6ec58b6cfcf21d0c0345af Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 3 Dec 2012 13:22:28 +0200 Subject: [PATCH] Fix github issue #967 --- app/views/protected_branches/index.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index 50a817124..f408fd16c 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -39,10 +39,13 @@ - if branch.name == @project.root_ref %span.label default %td - = link_to project_commit_path(@project, branch.commit.id) do - = truncate branch.commit.id.to_s, length: 10 - = time_ago_in_words(branch.commit.committed_date) - ago + - if branch.commit + = link_to project_commit_path(@project, branch.commit.id) do + = truncate branch.commit.id.to_s, length: 10 + = time_ago_in_words(branch.commit.committed_date) + ago + - else + (branch was removed from repository) %td - if can? current_user, :admin_project, @project = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small" -- 2.11.0