fix(stats): more accurat stats about deleted dossiers

This commit is contained in:
Paul Chavard 2024-04-02 23:42:58 +02:00
parent bb88be7d9c
commit 282ce1322c
8 changed files with 38 additions and 17 deletions

View file

@ -14,6 +14,6 @@ class Cron::Datagouv::FileByMonthJob < Cron::CronJob
end
def data
Dossier.where(created_at: 1.month.ago.all_month).count
Dossier.visible_by_user_or_administration.where(created_at: 1.month.ago.all_month).count
end
end

View file

@ -14,6 +14,8 @@ class Cron::Datagouv::FileDeposeByMonthJob < Cron::CronJob
end
def data
Dossier.where(depose_at: 1.month.ago.all_month).count
Dossier.visible_by_user_or_administration
.where(depose_at: 1.month.ago.all_month).count + DeletedDossier
.where(depose_at: 1.month.ago.all_month).count
end
end