about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-17 02:51:56 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-17 02:51:56 -0600
commit296ec59fc93116dc177901c11640066b31b91438 (patch)
tree69283120817da38976947b4ddfbdbc83d671c982 /app/models
parent46acfb7f3c6d6cc84cc6182933b055898a360d28 (diff)
Do not try to update destroyed `Status` objects.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb1
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}")