Commit fc058605c25ae20272f7dcc60396ffd9279bf89b
1 parent
d4ebde93
Exists in
master
and in
4 other branches
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 | 28 | = f.label :owner_id |
29 | 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 | 32 | .clearfix |
33 | 33 | = f.label :default_branch, "Default Branch" |
34 | 34 | .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;") | ... | ... |