From 0bf4455c61d754f41ae7965ad2e5e396e1586ed2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 10 Oct 2019 16:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/shixun.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 4912ea15a..da6853ac0 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -129,7 +129,7 @@ class Shixun < ApplicationRecord end def main_mirror_id - mirror_repositories.published_main_mirror.first.try(:id) || -1 + mirror_repositories.where(main_type: 1).first.try(:id) || -1 end # 实训对应的镜像小类别名(已选)