From 25d08e6752309f9797f78d1a87628f6c8e332bb2 Mon Sep 17 00:00:00 2001 From: Mike Sanders Date: Wed, 25 Mar 2026 11:53:42 +0100 Subject: [PATCH 1/2] only add active events to stale event mail --- app/mailers/curation_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/curation_mailer.rb b/app/mailers/curation_mailer.rb index d5f4af9be..53dbe3a00 100644 --- a/app/mailers/curation_mailer.rb +++ b/app/mailers/curation_mailer.rb @@ -30,7 +30,7 @@ def events_require_approval(provider, cut_off_time) # @events = @provider.events.where { |e| e.lmm_processed > cut_off_time } @new_events = @provider.events.filter { |e| e.created_at > cut_off_time } - @stale_events = @provider.events.filter { |e| e.stale? } + @stale_events = @provider.events.filter { |e| e.not_finished.stale? } subject = t('mailer.events_require_approval.subject') mail(subject:, to: @provider.content_curation_email) do |format| format.html From 4970c18d9aafdd8561b0ca1271f57756191bdb38 Mon Sep 17 00:00:00 2001 From: Mike Sanders Date: Wed, 25 Mar 2026 12:14:12 +0100 Subject: [PATCH 2/2] typo --- app/mailers/curation_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/curation_mailer.rb b/app/mailers/curation_mailer.rb index 53dbe3a00..0d34d865b 100644 --- a/app/mailers/curation_mailer.rb +++ b/app/mailers/curation_mailer.rb @@ -30,7 +30,7 @@ def events_require_approval(provider, cut_off_time) # @events = @provider.events.where { |e| e.lmm_processed > cut_off_time } @new_events = @provider.events.filter { |e| e.created_at > cut_off_time } - @stale_events = @provider.events.filter { |e| e.not_finished.stale? } + @stale_events = @provider.events.not_finished.filter { |e| e.stale? } subject = t('mailer.events_require_approval.subject') mail(subject:, to: @provider.content_curation_email) do |format| format.html