解决版本库类型更新不成功的问题
This commit is contained in:
parent
159a91878f
commit
234a8d7f7d
|
|
@ -395,7 +395,8 @@ class ShixunsController < ApplicationController
|
|||
gshixun = g.fork(@shixun.gpid, User.current.gid)
|
||||
if !gshixun.try(:id).blank?
|
||||
myshixun.update_column(:gpid, gshixun.id) if myshixun.try(:gpid).blank? # 为了防止多次fork
|
||||
Repository.create!(:myshixun_id => myshixun.id, :identifier => gshixun.name,:project_id => -1, :shixun_id => -2, :type => "Repository::Gitlab")
|
||||
rep = Repository.create!(:myshixun_id => myshixun.id, :identifier => gshixun.name,:project_id => -1, :shixun_id => -2)
|
||||
rep.update_column(:type, "Repository::Gitlab")
|
||||
rep_url = Base64.urlsafe_encode64(git_shixun_url_ip @shixun, "educoder") # 注意:educoder为默认给实训创建版本库的用户,如果换成别的用户,名字要相应的修改
|
||||
uri = "#{shixun_tomcat}/bridge/game/openGameInstance"
|
||||
params = {tpiID: "#{myshixun.id}", tpmID: "#{@shixun.id}", instanceGitURL:rep_url, operationEnvironment:"#{@shixun.try(:language)}"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue