From 7736e524068225be53a189bba377eeeb1a1dd154 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Tue, 26 Nov 2019 17:19:50 +0800 Subject: [PATCH] modified laboratory --- app/controllers/concerns/laboratory_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/laboratory_helper.rb b/app/controllers/concerns/laboratory_helper.rb index ecb478388..e03273d68 100644 --- a/app/controllers/concerns/laboratory_helper.rb +++ b/app/controllers/concerns/laboratory_helper.rb @@ -26,7 +26,7 @@ module LaboratoryHelper end def default_yun_session - @_default_yun_session = "#{request.subdomain.split('.').first}_user_id" - # @_default_yun_session = "#{current_laboratory.try(:identifier).split('.').first}_user_id" + laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) + @_default_yun_session = "#{laboratory.try(:identifier).split('.').first}_user_id" end end \ No newline at end of file