mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 16:25:19 +01:00
Use touch_all
for time column updates (#33295)
This commit is contained in:
parent
234af14966
commit
3c71ee9b90
2 changed files with 2 additions and 2 deletions
|
@ -350,7 +350,7 @@ class User < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def revoke_access!
|
def revoke_access!
|
||||||
Doorkeeper::AccessGrant.by_resource_owner(self).update_all(revoked_at: Time.now.utc)
|
Doorkeeper::AccessGrant.by_resource_owner(self).touch_all(:revoked_at)
|
||||||
|
|
||||||
Doorkeeper::AccessToken.by_resource_owner(self).in_batches do |batch|
|
Doorkeeper::AccessToken.by_resource_owner(self).in_batches do |batch|
|
||||||
batch.touch_all(:revoked_at)
|
batch.touch_all(:revoked_at)
|
||||||
|
|
|
@ -46,7 +46,7 @@ RSpec.describe ReblogService do
|
||||||
Status
|
Status
|
||||||
.where(id: reblog_of_id)
|
.where(id: reblog_of_id)
|
||||||
.where(text: 'discard-status-text')
|
.where(text: 'discard-status-text')
|
||||||
.update_all(deleted_at: Time.now.utc)
|
.touch_all(:deleted_at)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue