diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 00c018cbd..7fbf2fa47 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -1030,7 +1030,7 @@ private # 防止跟tpm版本库重名,加了前缀secret repo_path = repo_namespace(current_user.login, "secret_#{@shixun.identifier}") GitService.add_repository(repo_path: repo_path) - @shixun.shixun_secret_repository.create(repo_name: repo_path.split(".")[0]) + ShixunSecretRepository.create!(repo_name: repo_path.split(".")[0], shixun_id: @shixun.id``) end end