mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:14:12 +08:00
FIX: resets pending automations only if necessary (#26685)
Prior to this fix, any change to an automation would reset `pending_automations`, now we only do it if any value related to recurrence (start_date, interval, frequency, execute_at...) has been changed. It means that any trigger creating `pending_automations` now needs to manage them in the `on_update` callback.
This commit is contained in:
@ -162,7 +162,6 @@ module DiscourseAutomation
|
||||
end
|
||||
|
||||
def reset!
|
||||
pending_automations.delete_all
|
||||
pending_pms.delete_all
|
||||
scriptable&.on_reset&.call(self)
|
||||
end
|
||||
|
Reference in New Issue
Block a user