Merge pull request #8387 from demarches-simplifiees/US/fix-missing-dossier-preload
fix(instructeurs/dossier#show): missing preload on dossier
This commit is contained in:
commit
07001e8866
2 changed files with 4 additions and 4 deletions
|
@ -271,14 +271,14 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def dossier
|
||||
@dossier ||= dossier_scope.find(params[:dossier_id])
|
||||
@dossier ||= DossierPreloader.load_one(dossier_scope.find(params[:dossier_id]))
|
||||
end
|
||||
|
||||
def dossier_with_champs
|
||||
@dossier ||= dossier_scope
|
||||
@dossier ||= DossierPreloader.load_one(dossier_scope
|
||||
.with_champs
|
||||
.with_annotations
|
||||
.find(params[:dossier_id])
|
||||
.find(params[:dossier_id]))
|
||||
end
|
||||
|
||||
def commentaire_params
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
= link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--tertiary'
|
||||
|
||||
%h2.fr-h6= t('views.shared.dossiers.demande.form')
|
||||
- champs = dossier.champs_public.includes(:type_de_champ)
|
||||
- champs = dossier.champs_public
|
||||
- if champs.any? || dossier.procedure.routing_enabled?
|
||||
.card
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, dossier: dossier, demande_seen_at: demande_seen_at, profile: profile }
|
||||
|
|
Loading…
Reference in a new issue