chore(rubocop): fix Rails/WhereMissing
This commit is contained in:
parent
f4ad5289cd
commit
1af404c5e7
2 changed files with 3 additions and 5 deletions
|
@ -286,7 +286,7 @@ class Dossier < ApplicationRecord
|
||||||
order(depose_at: 'asc')
|
order(depose_at: 'asc')
|
||||||
}
|
}
|
||||||
scope :en_cours, -> { not_archived.state_en_construction_ou_instruction }
|
scope :en_cours, -> { not_archived.state_en_construction_ou_instruction }
|
||||||
scope :without_followers, -> { left_outer_joins(:follows).where(follows: { id: nil }) }
|
scope :without_followers, -> { where.missing(:follows) }
|
||||||
scope :with_followers, -> { left_outer_joins(:follows).where.not(follows: { id: nil }) }
|
scope :with_followers, -> { left_outer_joins(:follows).where.not(follows: { id: nil }) }
|
||||||
scope :with_champs, -> {
|
scope :with_champs, -> {
|
||||||
includes(champs_public: [
|
includes(champs_public: [
|
||||||
|
|
|
@ -3,10 +3,8 @@ namespace :hotfix do
|
||||||
task dossiers_attestations: :environment do
|
task dossiers_attestations: :environment do
|
||||||
dossiers = Dossier
|
dossiers = Dossier
|
||||||
.joins(procedure: :attestation_template)
|
.joins(procedure: :attestation_template)
|
||||||
.left_outer_joins(:attestation)
|
.where.missing(:attestation)
|
||||||
.where(attestation_templates: { activated: true },
|
.where(attestation_templates: { activated: true }, state: "accepte")
|
||||||
attestations: { id: nil },
|
|
||||||
state: "accepte")
|
|
||||||
.where("dossiers.processed_at > '2022-01-24'")
|
.where("dossiers.processed_at > '2022-01-24'")
|
||||||
progress = ProgressReport.new(dossiers.count)
|
progress = ProgressReport.new(dossiers.count)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue