取不到学校,再拿id直接空指针
This commit is contained in:
parent
d54f37e630
commit
36c90f1dfd
|
@ -33,7 +33,7 @@ class WelcomeController < ApplicationController
|
||||||
if params[:school_id]
|
if params[:school_id]
|
||||||
@school_id = params[:school_id]
|
@school_id = params[:school_id]
|
||||||
elsif User.current.logged? && User.current.user_extensions.school
|
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
|
end
|
||||||
@logoLink ||= logolink()
|
@logoLink ||= logolink()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue