mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
FIX: check if post exists in topic
This commit is contained in:
parent
7690cc6ca5
commit
2418daeb63
@ -970,7 +970,7 @@ SQL
|
||||
num_hours = time.to_f
|
||||
|
||||
if num_hours > 0
|
||||
last_post_created_at = self.ordered_posts.last.created_at || time_now
|
||||
last_post_created_at = self.ordered_posts.last.present? ? self.ordered_posts.last.created_at : time_now
|
||||
topic_status_update.execute_at = last_post_created_at + num_hours.hours
|
||||
topic_status_update.created_at = last_post_created_at
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user