修复:导入项目无权限导入失败

This commit is contained in:
yystopf 2025-09-15 16:42:10 +08:00
parent 125d7dd032
commit 3ede69e436
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ class MigrateRemoteRepositoryJob < ApplicationJob
UpdateProjectTopicJob.set(wait: 1.seconds).perform_later(project_id) if project_id.present?
puts "############ mirror status: #{repo.mirror.status} ############"
else
gitea_result = $gitea_client.get_repos_by_owner_repo(repo&.project&.owner&.login, repo&.project&.identifier)
if gitea_result["empty"]
gitea_result = $gitea_client.get_repos_by_owner_repo(repo&.project&.owner&.login, repo&.project&.identifier) rescue nil
if gitea_result.nil? || gitea_result["empty"]
repo&.mirror&.failed!
repo&.project&.update_columns(status: 0)
else