Browse Source

修复:The target couldn't be found

pull/347/head
yystopf 1 year ago
parent
commit
3760eab73d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/projects_controller.rb

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

@@ -300,8 +300,8 @@ class ProjectsController < ApplicationController

def simple
if !@project.common? && @project&.repository&.mirror&.waiting?
gitea_result = $gitea_client.get_repos_by_owner_repo(@project&.owner&.login, @project&.identifier)
if !gitea_result["empty"]
gitea_result = $gitea_client.get_repos_by_owner_repo(@project&.owner&.login, @project&.identifier) rescue nil
if gitea_result.present? && !gitea_result["empty"]
@project&.update_columns(gpid: gitea_result["id"])
@project&.repository&.mirror&.succeeded!
project_id = @project&.id


Loading…
Cancel
Save