infer champ type from class
This commit is contained in:
parent
aee8db99d0
commit
169f254c79
1 changed files with 1 additions and 1 deletions
|
@ -693,7 +693,7 @@ class Procedure < ApplicationRecord
|
|||
dossiers_sample = dossiers.termine.limit(100)
|
||||
total_size = Champ
|
||||
.includes(piece_justificative_file_attachment: :blob)
|
||||
.where(type: "Champs::PieceJustificativeChamp", dossier: dossiers_sample)
|
||||
.where(type: Champs::PieceJustificativeChamp.to_s, dossier: dossiers_sample)
|
||||
.sum('active_storage_blobs.byte_size')
|
||||
|
||||
total_size / dossiers_sample.length
|
||||
|
|
Loading…
Reference in a new issue