Followup for issue #2541 - only update active jobs and triggers.

This commit is contained in:
Martin Edenhofer 2019-06-13 02:07:09 +02:00
parent 757af308a8
commit 84feacd816

View file

@ -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|