Merge pull request #6080 from betagouv/fix-avis-bug

add condition regarding experts emails in dossier controller instructeur
This commit is contained in:
Kara Diaby 2021-04-09 13:19:12 +02:00 committed by GitHub
commit b6b8642d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,9 @@ module Instructeurs
def avis
@avis_seen_at = current_instructeur.follows.find_by(dossier: dossier)&.avis_seen_at
@avis = Avis.new
@experts_emails = dossier.procedure.experts_procedures.where(revoked_at: nil).map(&:expert).map(&:email).sort
if @dossier.procedure.feature_enabled?(:admin_affect_experts_to_avis)
@experts_emails = dossier.procedure.experts_procedures.where(revoked_at: nil).map(&:expert).map(&:email).sort
end
end
def personnes_impliquees