From 8c2c63c0c0f537dc292b05e6cd162253fd3c22fd Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 20 Dec 2019 15:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2403=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/cooperative/base_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/cooperative/base_controller.rb b/app/controllers/cooperative/base_controller.rb index 463880e87..bebf5f7b0 100644 --- a/app/controllers/cooperative/base_controller.rb +++ b/app/controllers/cooperative/base_controller.rb @@ -16,7 +16,7 @@ class Cooperative::BaseController < ApplicationController private def current_laboratory - @_current_laboratory ||= Laboratory.find_by_subdomain(request.subdomain) + @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.first) end def current_setting_or_default(name)