Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
cxt 5 years ago
commit c5d1542f0b

@ -48,7 +48,7 @@ module GitHelper
def project_fork(container, original_rep_path, username) def project_fork(container, original_rep_path, username)
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank? raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
# 将要生成的仓库名字 # 将要生成的仓库名字
new_repo_name = "#{username.try(:strip)}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}" new_repo_name = "#{username.try(:strip)} /#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}"
uid_logger("start fork container: repo_name is #{new_repo_name}") uid_logger("start fork container: repo_name is #{new_repo_name}")
GitService.fork_repository(repo_path: original_rep_path, fork_repository_path: (new_repo_name + ".git")) GitService.fork_repository(repo_path: original_rep_path, fork_repository_path: (new_repo_name + ".git"))
container.update_attributes!(:repo_name => new_repo_name) container.update_attributes!(:repo_name => new_repo_name)

@ -714,6 +714,7 @@ class ShixunsController < ApplicationController
end end
end end
rescue Exception => e rescue Exception => e
logger.info("shixun_exec error: #{e.message}")
if e.message != "ActiveRecord::RecordInvalid" if e.message != "ActiveRecord::RecordInvalid"
logger.error("##########project_fork error #{e.message}") logger.error("##########project_fork error #{e.message}")
@myshixun.destroy! @myshixun.destroy!

@ -25,7 +25,9 @@ class ProjectPackages::SaveService < ApplicationService
end end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
package.assign_attributes(params) columns = %i[project_package_category_id title content deadline_at
min_price max_price contact_name contact_phone]
package.assign_attributes(params.slice(*columns))
package.save! package.save!
# 处理附件 # 处理附件

@ -305,9 +305,6 @@ class CommonWorkDetailIndex extends Component{
.floatSpinParent .ant-spin-nested-loading { .floatSpinParent .ant-spin-nested-loading {
float: right; float: right;
} }
.floatSpinParent .ant-spin-nested-loading .ant-spin-spinning{
top: 10px;
}
`}</style> `}</style>
{this.props.isAdmin()? <Spin spinning={this.state.donwloading} style={{ }}> {this.props.isAdmin()? <Spin spinning={this.state.donwloading} style={{ }}>
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}> <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>

Loading…
Cancel
Save