FIX: do not validate topic when resetting `bumped_at`

Migrated topics were failing when resetting `bumped_at` via
`reset-bump-date` endpoint because there was an existing
(imported) topic with same title.
This commit is contained in:
Arpit Jalan 2019-11-26 23:12:47 +05:30
parent 2714149fd2
commit 7e08dabeac
1 changed files with 2 additions and 1 deletions

View File

@ -1374,7 +1374,8 @@ class Topic < ActiveRecord::Base
post_type: Post.types[:regular]
).last || first_post
update!(bumped_at: post.created_at)
self.bumped_at = post.created_at
self.save(validate: false)
end
def auto_close_threshold_reached?