fork存在的时候则不重复fork
This commit is contained in:
parent
e198979738
commit
f2e337fb12
|
@ -35,7 +35,12 @@ class ShixunsController < ApplicationController
|
||||||
s = Trustie::Gitlab::Sync.new
|
s = Trustie::Gitlab::Sync.new
|
||||||
s.sync_user(User.current)
|
s.sync_user(User.current)
|
||||||
end
|
end
|
||||||
gshixun = g.fork(@shixun.gpid, User.current.gid)
|
if @shixun.gpid
|
||||||
|
gshixun = g.project(@shixun.gpid)
|
||||||
|
else
|
||||||
|
gshixun = g.fork(@shixun.gpid, User.current.gid)
|
||||||
|
end
|
||||||
|
|
||||||
if gshixun.id
|
if gshixun.id
|
||||||
myshixun = copy_myshixun(@shixun, gshixun)
|
myshixun = copy_myshixun(@shixun, gshixun)
|
||||||
challenges = @shixun.challenges
|
challenges = @shixun.challenges
|
||||||
|
|
Loading…
Reference in New Issue