FIX: updating topic stats failed silently for invalid topics

This commit is contained in:
Gerhard Schlager
2017-11-21 14:59:55 +01:00
parent 9208909b26
commit 613f4d737a
2 changed files with 45 additions and 4 deletions

View File

@ -412,7 +412,8 @@ class PostCreator
attrs[:word_count] = (@topic.word_count || 0) + @post.word_count
attrs[:excerpt] = @post.excerpt(220, strip_links: true) if new_topic?
attrs[:bumped_at] = @post.created_at unless @post.no_bump
@topic.update_attributes(attrs)
attrs[:updated_at] = 'now()'
@topic.update_columns(attrs)
end
end