diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 5e7cc545a..32541d571 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -58,7 +58,7 @@ class Dossier < ActiveRecord::Base scope :nouveaux, -> { not_archived.state_nouveaux } scope :en_instruction, -> { not_archived.state_en_instruction } scope :termine, -> { not_archived.state_termine } - scope :downloadable, -> { state_not_brouillon } + scope :downloadable, -> { state_not_brouillon.includes(:entreprise, :etablissement, :champs, :champs_private) } scope :en_cours, -> { not_archived.state_en_construction_ou_instruction } scope :without_followers, -> { includes(:follows).where(follows: { id: nil }) } scope :with_unread_notifications, -> { where(notifications: { already_read: false }) }