mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: correct revision debouncer for backup draft
We were debouncing on update_at which we kept on pushing forward, this was leading to not enough revisions.
This commit is contained in:
@ -137,7 +137,7 @@ class Draft < ActiveRecord::Base
|
||||
).create
|
||||
BackupDraftPost.create!(user_id: user.id, key: key, post_id: post.id)
|
||||
end
|
||||
elsif post.updated_at > 5.minutes.ago
|
||||
elsif post.last_version_at > 5.minutes.ago
|
||||
# bypass all validations here to maximize speed
|
||||
post.update_columns(
|
||||
raw: draft_body,
|
||||
|
Reference in New Issue
Block a user