mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
FIX: error importing some topics where bumped_at
coudln't be
determined.
This commit is contained in:
parent
6391dc7f28
commit
47573fcd99
1 changed files with 1 additions and 1 deletions
|
@ -470,7 +470,7 @@ class ImportScripts::Base
|
|||
|
||||
def update_bumped_at
|
||||
puts "", "updating bumped_at on topics"
|
||||
Post.exec_sql("update topics t set bumped_at = (select max(created_at) from posts where topic_id = t.id and post_type != #{Post.types[:moderator_action]})")
|
||||
Post.exec_sql("update topics t set bumped_at = COALESCE((select max(created_at) from posts where topic_id = t.id and post_type != #{Post.types[:moderator_action]}), bumped_at)")
|
||||
end
|
||||
|
||||
def update_last_posted_at
|
||||
|
|
Loading…
Reference in a new issue