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