about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/tasks/monsterfork.rake7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake
index 11c5d86d9..00a0eaedb 100644
--- a/lib/tasks/monsterfork.rake
+++ b/lib/tasks/monsterfork.rake
@@ -11,7 +11,12 @@ namespace :monsterfork do
       ActiveRecord::Base.logger.silence do
         i += statuses.count
         statuses.each do |s|
-          s.update_column(:normalized_text, normalize_status(s, cache: false))
+          begin
+            next if s.destroyed?
+            s.update_column(:normalized_text, normalize_status(s, cache: false))
+          rescue rescue ActiveRecord::RecordNotFound
+            true
+          end
         end
       end
     end