Skip to content

Commit

Permalink
Merge pull request #11391 from tchak/fix-gallery-pjs
Browse files Browse the repository at this point in the history
fix(gallery): do not show in gallery hidden pieces justificatives
  • Loading branch information
tchak authored Mar 4, 2025
2 parents da7bc6e + 4d2fc52 commit 21097a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/instructeurs/dossiers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ def set_gallery_attachments
gallery_attachments_ids = Rails.cache.fetch([dossier, "gallery_attachments"], expires_in: 10.minutes) do
champs_attachments_ids = dossier
.filled_champs
.filter { _1.class.in?([Champs::PieceJustificativeChamp, Champs::TitreIdentiteChamp]) }
.filter(&:piece_justificative_or_titre_identite?)
.filter(&:visible?)
.flat_map(&:piece_justificative_file)
.map(&:id)

Expand Down

0 comments on commit 21097a4

Please sign in to comment.