FIX: ensures we don't exit without pending automations (#26771)

This case is not supposed to happen but it seems safer to ensure this case will recreate pending automations.
This commit is contained in:
Joffrey JAFFEUX
2024-04-26 14:05:27 +02:00
committed by GitHub
parent 803c275bd7
commit e7f0aa52fa
2 changed files with 11 additions and 1 deletions

View File

@ -31,7 +31,7 @@ module DiscourseAutomation
if previous_start_date != start_date || previous_interval != interval ||
previous_frequency != frequency
automation.pending_automations.destroy_all
else
elsif automation.pending_automations.present?
return
end