Merge pull request #6740 from betagouv/fix-instructeur-daily-notifications

Correction de la requête de notification quotidienne des Instructeurs
This commit is contained in:
Paul Chavard 2021-12-09 12:21:56 +01:00 committed by GitHub
commit 78784d1c62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ class NotificationService
class << self
def send_instructeur_email_notification
Instructeur
.includes(assign_to: { procedure: :dossiers })
.includes(assign_to: [:procedure])
.where(assign_tos: { daily_email_notifications_enabled: true })
.find_in_batches { |instructeurs| send_batch_of_instructeurs_email_notification(instructeurs) }
end