chore(rubocop): fix Rails/WhereMissing

This commit is contained in:
Colin Darie 2023-04-19 12:03:08 +02:00
parent f4ad5289cd
commit 1af404c5e7
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 3 additions and 5 deletions

View file

@ -3,10 +3,8 @@ namespace :hotfix do
task dossiers_attestations: :environment do
dossiers = Dossier
.joins(procedure: :attestation_template)
.left_outer_joins(:attestation)
.where(attestation_templates: { activated: true },
attestations: { id: nil },
state: "accepte")
.where.missing(:attestation)
.where(attestation_templates: { activated: true }, state: "accepte")
.where("dossiers.processed_at > '2022-01-24'")
progress = ProgressReport.new(dossiers.count)