Browse Source

fix

pull/338/head
呱呱呱 2 years ago
parent
commit
5d31401d7e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/forks_controller.rb

+ 2
- 2
app/controllers/forks_controller.rb View File

@@ -38,7 +38,7 @@ class ForksController < ApplicationController
render_result(-1, "fork失败,组织已拥有了这个项目")
elsif gitea_check_exit(current_user)
render_result(-1, "fork失败,仓库底层数据出现了问题")
elsif @organization && gitea_check_exit(@organization)
elsif @organization && gitea_check_exit(@organization)
render_result(-1, "fork失败,fork失败,仓库底层数据出现了问题")
end
# return if current_user != @project.owner
@@ -52,7 +52,7 @@ class ForksController < ApplicationController
end

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?
end
end

Loading…
Cancel
Save