fix(data): backfill invalid dossier for tiers without tiers info

This commit is contained in:
mfo 2024-05-15 14:42:37 +02:00
parent 50735919c8
commit 68a624be9e
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
module Maintenance
class BackfillInvalidDossiersForTiersTask < MaintenanceTasks::Task
def collection
Dossier.where(for_tiers: true).where(mandataire_first_name: nil)
end
def process(element)
element.update_column(for_tiers: false)
end
end
end