FIX: Resetting bump date shouldn't fail when first post is hidden
This commit is contained in:
parent
fbd92916e5
commit
126be6c478
|
@ -1357,7 +1357,7 @@ class Topic < ActiveRecord::Base
|
|||
user_deleted: false,
|
||||
hidden: false,
|
||||
post_type: Post.types[:regular]
|
||||
).last
|
||||
).last || first_post
|
||||
|
||||
update!(bumped_at: post.created_at)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue