fix stream item generation for messages
Change-Id: I0f7deff680e80127d06fe4336d577cad5545689a Reviewed-on: https://gerrit.instructure.com/126455 Reviewed-by: Dan Minkevitch <dan@instructure.com> Tested-by: Jenkins Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
a130158b40
commit
e53c819c44
|
@ -153,7 +153,7 @@ class StreamItem < ActiveRecord::Base
|
||||||
|
|
||||||
ROOT_DISCUSSION_ENTRY_LIMIT = 3
|
ROOT_DISCUSSION_ENTRY_LIMIT = 3
|
||||||
def generate_data(object)
|
def generate_data(object)
|
||||||
self.context ||= object.context rescue nil
|
self.context ||= object.try(:context) unless object.is_a?(Message)
|
||||||
|
|
||||||
case object
|
case object
|
||||||
when DiscussionTopic
|
when DiscussionTopic
|
||||||
|
|
Loading…
Reference in New Issue