fix(stats): more accurat stats about deleted dossiers
This commit is contained in:
parent
bb88be7d9c
commit
282ce1322c
8 changed files with 38 additions and 17 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue