diff --git a/app/jobs/my_modules/due_date_reminder_job.rb b/app/jobs/my_modules/due_date_reminder_job.rb index 0ea3fc5a0..839f4d07f 100644 --- a/app/jobs/my_modules/due_date_reminder_job.rb +++ b/app/jobs/my_modules/due_date_reminder_job.rb @@ -3,7 +3,7 @@ module MyModules class DueDateReminderJob < ApplicationJob def perform - my_modules = MyModule.approaching_due_dates + my_modules = MyModule.uncomplete.approaching_due_dates my_modules.each do |task| TaskDueDateNotification.send_notifications({ my_module_id: task.id }) diff --git a/app/notifications/task_due_date_notification.rb b/app/notifications/task_due_date_notification.rb index 95100d8e5..c906549d1 100644 --- a/app/notifications/task_due_date_notification.rb +++ b/app/notifications/task_due_date_notification.rb @@ -17,6 +17,6 @@ class TaskDueDateNotification < BaseNotification end after_deliver do - MyModule.find(params[:my_module_id]).update(due_date_notification_sent: true) + MyModule.find(params[:my_module_id]).update_column(:due_date_notification_sent, true) end end