2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FIX: error importing some topics where bumped_at coudln't be

determined.
This commit is contained in:
Robin Ward 2014-10-06 09:26:52 -04:00
parent 6391dc7f28
commit 47573fcd99

View file

@ -470,7 +470,7 @@ class ImportScripts::Base
def update_bumped_at def update_bumped_at
puts "", "updating bumped_at on topics" 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 end
def update_last_posted_at def update_last_posted_at