@ -1101,7 +1101,7 @@ class User < Principal
# 超级管理员或者role为1
def manager_of_shixun?(shixun, *arg)
user = (arg.present? ? arg.first : User.current)
member = shixun.shixun_members.where(:role => [1,2], :user_id => self.id)
member = shixun&.shixun_members.where(:role => [1,2], :user_id => self.id)
(!member.blank? || user.admin?) ? true : false
end