BigW Consortium Gitlab

Commit 52ae0544 by Dmitriy Zaporozhets

prevent exception when trying to edit empty project

parent 11b89eb3
......@@ -36,10 +36,10 @@
.input
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- unless @repository.heads.empty?
- unless @project.empty_repo?
.clearfix
= 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)
......
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