From 84feacd8165ba1e1c57dec04becb82eaede869be Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 13 Jun 2019 02:07:09 +0200 Subject: [PATCH] Followup for issue #2541 - only update active jobs and triggers. --- ...0408000001_issue_2541_fix_notification_email_without_body.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb b/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb index bbf8e5c55..d94f51688 100644 --- a/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb +++ b/db/migrate/20190408000001_issue_2541_fix_notification_email_without_body.rb @@ -6,7 +6,7 @@ class Issue2541FixNotificationEmailWithoutBody < ActiveRecord::Migration[5.1] # update jobs and triggers [::Job, ::Trigger].each do |model| - model.all.each do |record| + model.where(active: true).each do |record| next if record.perform.blank? %w[notification.email notification.sms].each do |action|