prevent exception when trying to edit empty project
This commit is contained in:
parent
11b89eb381
commit
52ae054447
1 changed files with 2 additions and 2 deletions
|
@ -36,10 +36,10 @@
|
||||||
.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
|
||||||
|
|
||||||
- unless @repository.heads.empty?
|
- unless @project.empty_repo?
|
||||||
.clearfix
|
.clearfix
|
||||||
= f.label :default_branch, "Default Branch"
|
= f.label :default_branch, "Default Branch"
|
||||||
.input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
|
.input= f.select(:default_branch, @repository.branch_names, {})
|
||||||
|
|
||||||
|
|
||||||
- if can?(current_user, :change_public_mode, @project)
|
- if can?(current_user, :change_public_mode, @project)
|
||||||
|
|
Loading…
Add table
Reference in a new issue