取不到学校,再拿id直接空指针

This commit is contained in:
yanxd 2014-07-04 11:30:41 +08:00
parent d54f37e630
commit 36c90f1dfd
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class WelcomeController < ApplicationController
if params[:school_id]
@school_id = params[:school_id]
elsif User.current.logged? && User.current.user_extensions.school
@school_id = User.current.user_extensions.school.id
@school_id = User.current.user_extensions.school.try(:id)
end
@logoLink ||= logolink()
end