From 296ec59fc93116dc177901c11640066b31b91438 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 17 Nov 2019 02:51:56 -0600 Subject: Do not try to update destroyed `Status` objects. --- app/models/status.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app') 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}") -- cgit