版本库不能创建问题
This commit is contained in:
parent
e31c35c6a0
commit
e50207e4e8
|
@ -363,7 +363,7 @@ update
|
|||
@repository.identifier = @repository.identifier.downcase
|
||||
@repository.url = @repository.identifier
|
||||
ActiveRecord::Base.transaction do
|
||||
begin
|
||||
# begin
|
||||
if request.post? && @repository.save!
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
s.create_project(@project, @repository)
|
||||
|
@ -372,12 +372,12 @@ update
|
|||
else
|
||||
redirect_to settings_project_url(@project, :tab => 'repositories',:repository_error_message=>@repository.errors.full_messages)
|
||||
end
|
||||
rescue Exception => e
|
||||
logger.info("create repository #{e.message}")
|
||||
@repo_error= "666"
|
||||
redirect_to settings_project_url(@project, :tab => 'repositories', :create_error => "版本库创建失败,用户名或版本库名中不允许包含特殊字符")
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
# rescue Exception => e
|
||||
# logger.info("create repository #{e.message}")
|
||||
# @repo_error= "666"
|
||||
# redirect_to settings_project_url(@project, :tab => 'repositories', :create_error => "版本库创建失败,用户名或版本库名中不允许包含特殊字符")
|
||||
# raise ActiveRecord::Rollback
|
||||
# end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue