diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 477e10c15..c6d3851f3 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -238,8 +238,7 @@ class Dossier < ApplicationRecord scope :processed_in_month, -> (date) do date = date.to_datetime state_termine - .joins(:traitements) - .where(traitements: { processed_at: date.beginning_of_month..date.end_of_month }) + .where(processed_at: date.beginning_of_month..date.end_of_month) end scope :ordered_for_export, -> { order(depose_at: 'asc')