diff --git a/app/services/pieces_justificatives_service.rb b/app/services/pieces_justificatives_service.rb index 6a6dd7818..cac0734d4 100644 --- a/app/services/pieces_justificatives_service.rb +++ b/app/services/pieces_justificatives_service.rb @@ -114,7 +114,11 @@ class PiecesJustificativesService procedure = dossiers.first.procedure - dossiers.find_each do |dossier| + dossiers + .includes(:champs, :champs_private, :commentaires, :individual, + :traitement, :etablissement, + user: :france_connect_information, avis: :expert) + .find_each do |dossier| pdf = ApplicationController .render(template: 'dossiers/show', formats: [:pdf], assigns: {