From 523dc9b343dae770e1ae6ed9ab38b32917790438 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 5 Jun 2015 10:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E3=80=81=E5=8F=91=E5=B8=96=E5=9B=9E=E5=B8=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 9e36d15f4..c3cb3d8c9 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -94,8 +94,8 @@ class MessagesController < ApplicationController update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE end # 与我相关动态的记录add start - if(@board.course_id>0) #项目的先不管 - teachers = searchTeacherAndAssistant(@board.course); + if(@board && @board.course) #项目的先不管 + teachers = searchTeacherAndAssistant(@board.course) for teacher in teachers if(teacher.user_id != User.current.id) notify = ActivityNotify.new() @@ -178,7 +178,7 @@ class MessagesController < ApplicationController end # 与我相关动态的记录add start - if(@board.course_id>0) #项目的先不管 + if(@board && @board.course) #项目的先不管 notifyto_arr = {} notifyto_arr[@topic.author_id] = @topic.author_id if( params[:parent_topic] != nil && params[:parent_topic] != '')