修改删除主版本库后,新建可以设置主版本库
This commit is contained in:
parent
518ce15df5
commit
390aa632cd
|
@ -236,13 +236,14 @@ module RepositoriesHelper
|
|||
# 判断项目是否有主版本库
|
||||
def judge_main_repository(pro)
|
||||
if pro.repositories.blank?
|
||||
return false
|
||||
status = false
|
||||
else
|
||||
pro.repositories.sort.each do |rep|
|
||||
rep.is_default?
|
||||
return true
|
||||
pro.repositories.each do |rep|
|
||||
status = true and break if rep.is_default?
|
||||
status = false
|
||||
end
|
||||
end
|
||||
status
|
||||
end
|
||||
# def cvs_field_tags(form, repository)
|
||||
# content_tag('p', form.text_field(
|
||||
|
|
Loading…
Reference in New Issue