diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-12-06 12:44:38 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-12-06 12:44:38 +0100 |
commit | 1df392819d544e62ae9f685020e462c960d31635 (patch) | |
tree | e43bc3a7addbcc044979dbbc1cb44a86d4502efc /app/models/status.rb | |
parent | fe9340d95e9ae9a1870e9951e9b00ad5df4cc257 (diff) | |
parent | 155cf126807ab25da4d0e5da55b2d598c981e2ab (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/status.rb')
-rw-r--r-- | app/models/status.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 65cd97c51..e709b16c8 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -241,8 +241,8 @@ class Status < ApplicationRecord update_status_stat!(key => [public_send(key) - 1, 0].max) end - after_create :increment_counter_caches - after_destroy :decrement_counter_caches + after_create_commit :increment_counter_caches + after_destroy_commit :decrement_counter_caches after_create_commit :store_uri, if: :local? after_create_commit :update_statistics, if: :local? @@ -446,7 +446,7 @@ class Status < ApplicationRecord end def store_uri - update_attribute(:uri, ActivityPub::TagManager.instance.uri_for(self)) if uri.nil? + update_column(:uri, ActivityPub::TagManager.instance.uri_for(self)) if uri.nil? end def prepare_contents |