fix(data): backfill invalid dossier for tiers without tiers info
This commit is contained in:
parent
50735919c8
commit
68a624be9e
1 changed files with 13 additions and 0 deletions
|
@ -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
|
Loading…
Reference in a new issue