Commit d0d10992bc7045c0ffbf07c45aad2f061f88bbc3
1 parent
d7f551bd
Exists in
master
and in
4 other branches
Fix edit project page when repo does not exist
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/views/projects/edit.html.haml
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | .input | 22 | .input |
23 | = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 | 23 | = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 |
24 | 24 | ||
25 | - - if @project.repository.branch_names.any? | 25 | + - if @project.repository.exists? && @project.repository.branch_names.any? |
26 | .clearfix | 26 | .clearfix |
27 | = f.label :default_branch, "Default Branch" | 27 | = f.label :default_branch, "Default Branch" |
28 | .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) | 28 | .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) |