Merge pull request #10110 from demarches-simplifiees/update-bulk-messages-maintenance-tasks
fix(maintenance task): pass a collection instead of an array
This commit is contained in:
commit
fc0d27c23a
2 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
module Maintenance
|
||||
class BackfillBulkMessagesWithProcedureIdTask < MaintenanceTasks::Task
|
||||
def collection
|
||||
BulkMessage.all.filter { |bm| bm.procedure.nil? && bm.groupe_instructeurs.present? }
|
||||
BulkMessage.where(procedure: nil).where.missing(:groupe_instructeurs)
|
||||
end
|
||||
|
||||
def process(element)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
module Maintenance
|
||||
class DestroyIncompleteBulkMessagesTask < MaintenanceTasks::Task
|
||||
def collection
|
||||
BulkMessage.all.filter { |bm| bm.procedure.nil? && bm.groupe_instructeurs.blank? }
|
||||
BulkMessage.where(procedure: nil).where.missing(:groupe_instructeurs)
|
||||
end
|
||||
|
||||
def process(element)
|
||||
|
|
Loading…
Reference in a new issue