Commit fc058605c25ae20272f7dcc60396ffd9279bf89b

Authored by Dmitriy Zaporozhets
1 parent d4ebde93

fixed app crash if edit empty project from admin

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/views/admin/projects/_form.html.haml
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 = f.label :owner_id 28 = f.label :owner_id
29 .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] } 29 .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
30 30
31 - - unless @admin_project.heads.empty? 31 + - if @admin_project.repo_exists?
32 .clearfix 32 .clearfix
33 = f.label :default_branch, "Default Branch" 33 = f.label :default_branch, "Default Branch"
34 .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;") 34 .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;")