From 4c0b1573833b25fdcd0d52b534422d8148862732 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Thu, 7 Apr 2022 15:13:34 +0200 Subject: [PATCH] includes stuff --- app/services/pieces_justificatives_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: {