summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-09 20:04:26 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-09 20:04:26 +0200
commitfc058605c25ae20272f7dcc60396ffd9279bf89b (patch)
treeea4e9122111426b5e2f697e30ed6bee20820dda4
parentd4ebde937804727040faaabb69422b3763d247a8 (diff)
downloadgitlab-ce-fc058605c25ae20272f7dcc60396ffd9279bf89b.tar.gz
fixed app crash if edit empty project from admin
-rw-r--r--app/views/admin/projects/_form.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml
index abb51bba8c1..8e16437e39a 100644
--- a/app/views/admin/projects/_form.html.haml
+++ b/app/views/admin/projects/_form.html.haml
@@ -28,7 +28,7 @@
= f.label :owner_id
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
- - unless @admin_project.heads.empty?
+ - if @admin_project.repo_exists?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;")