Fix expired announcements being re-published (#12964)
This commit is contained in:
parent
2f8c3c17ee
commit
401f32f9ee
5 changed files with 16 additions and 9 deletions
|
@ -34,7 +34,7 @@ class Scheduler::ScheduledStatusesScheduler
|
|||
end
|
||||
|
||||
def unpublish_expired_announcements!
|
||||
expired_announcements.in_batches.update_all(published: false)
|
||||
expired_announcements.in_batches.update_all(published: false, scheduled_at: nil)
|
||||
end
|
||||
|
||||
def expired_announcements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue