mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Fix due date reminder spam for locked tasks [SCI-9885]
This commit is contained in:
parent
b38fe27e63
commit
788f01aeae
2 changed files with 2 additions and 2 deletions
|
@ -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 })
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue