fixed fork后重命名项目标识再forked失败
This commit is contained in:
parent
ca85975197
commit
b73f724bb7
|
@ -15,6 +15,7 @@ class ForksController < ApplicationController
|
||||||
elsif ForkUser.exists?(fork_project_id: @project.id, user_id: current_user.id)
|
elsif ForkUser.exists?(fork_project_id: @project.id, user_id: current_user.id)
|
||||||
fork = ForkUser.find_by(fork_project_id: @project.id, user_id: current_user.id)
|
fork = ForkUser.find_by(fork_project_id: @project.id, user_id: current_user.id)
|
||||||
render json: { status: -1, identifier: fork.fork_project&.identifier, message: "fork失败,你已拥有了这个项目" }
|
render json: { status: -1, identifier: fork.fork_project&.identifier, message: "fork失败,你已拥有了这个项目" }
|
||||||
|
return
|
||||||
elsif Project.exists?(user_id: current_user.id, identifier: @project.identifier)
|
elsif Project.exists?(user_id: current_user.id, identifier: @project.identifier)
|
||||||
render_result(0, "fork失败,你已拥有了这个项目")
|
render_result(0, "fork失败,你已拥有了这个项目")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue