Merge pull request '修复bug' (#84) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
KingChan 2023-07-13 11:03:26 +08:00
commit f109332288
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class ForksController < ApplicationController
render_result(-1, "fork失败组织已拥有了这个项目") render_result(-1, "fork失败组织已拥有了这个项目")
elsif gitea_check_exit(current_user) elsif gitea_check_exit(current_user)
render_result(-1, "fork失败仓库底层数据出现了问题") render_result(-1, "fork失败仓库底层数据出现了问题")
elsif @organization && gitea_check_exit(@organization) elsif @organization && gitea_check_exit(@organization)
render_result(-1, "fork失败fork失败仓库底层数据出现了问题") render_result(-1, "fork失败fork失败仓库底层数据出现了问题")
end end
# return if current_user != @project.owner # return if current_user != @project.owner
@ -52,7 +52,7 @@ class ForksController < ApplicationController
end end
def gitea_check_exit(user) def gitea_check_exit(user)
data = Gitea::Repository::GetService.new(user, params[:new_identifier] || @project.identifier)).call data = Gitea::Repository::GetService.new(user, params[:new_identifier]|| @project.identifier).call
data.present? data.present?
end end
end end