remove dossier.linked_dossiers

This commit is contained in:
Paul Chavard 2020-02-11 17:38:04 +01:00
parent 0d55743d9f
commit 7afeae1408
4 changed files with 4 additions and 7 deletions

View file

@ -584,10 +584,6 @@ class Dossier < ApplicationRecord
!PiecesJustificativesService.liste_pieces_justificatives(self).empty? && PiecesJustificativesService.pieces_justificatives_total_size(self) < Dossier::TAILLE_MAX_ZIP
end
def linked_dossiers
Dossier.where(id: champs.filter(&:dossier_link?).map(&:value).compact)
end
def linked_dossiers_for(instructeur)
dossier_ids = champs.filter(&:dossier_link?).map(&:value).compact
(instructeur.dossiers.where(id: dossier_ids) + instructeur.dossiers_from_avis.where(id: dossier_ids)).uniq