Commit d0d10992 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix edit project page when repo does not exist

parent d7f551bd
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.input .input
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- if @project.repository.branch_names.any? - if @project.repository.exists? && @project.repository.branch_names.any?
.clearfix .clearfix
= f.label :default_branch, "Default Branch" = f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment