diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-17 02:51:56 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-17 02:51:56 -0600 |
commit | 296ec59fc93116dc177901c11640066b31b91438 (patch) | |
tree | 69283120817da38976947b4ddfbdbc83d671c982 /app/models | |
parent | 46acfb7f3c6d6cc84cc6182933b055898a360d28 (diff) |
Do not try to update destroyed `Status` objects.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 0dd1b07bc..4efa74b48 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -624,6 +624,7 @@ class Status < ApplicationRecord end def update_normalized_text + return if destroyed? return unless (normalized_text.blank? && !text.blank?) || saved_change_to_text? self.normalized_text = normalize_status(self) Rails.cache.delete("formatted_status:#{id}") |