Stop having things silently fail.

This commit is contained in:
Guo Xiang Tan 2016-06-20 14:27:15 +08:00
parent 1a6624960d
commit e72684f9dc
No known key found for this signature in database
GPG key ID: 19C321C8952B0F72

View file

@ -552,7 +552,7 @@ class Topic < ActiveRecord::Base
if new_post.present? if new_post.present?
# If we are moving posts, we want to insert the moderator post where the previous posts were # If we are moving posts, we want to insert the moderator post where the previous posts were
# in the stream, not at the end. # in the stream, not at the end.
new_post.update_attributes(post_number: opts[:post_number], sort_order: opts[:post_number]) if opts[:post_number].present? new_post.update_attributes!(post_number: opts[:post_number], sort_order: opts[:post_number]) if opts[:post_number].present?
# Grab any links that are present # Grab any links that are present
TopicLink.extract_from(new_post) TopicLink.extract_from(new_post)