From 65afbaba5905ca6f75c231bcd05cd6af269231f3 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Wed, 24 Jul 2024 17:05:09 +0200 Subject: [PATCH] small refacto to simplify scope --- app/models/dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 98a8be7f99e..748f959fca3 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -222,7 +222,7 @@ def classer_sans_suite(motivation: nil, instructeur: nil, processed_at: Time.zon scope :hidden_by_user, -> { where.not(hidden_by_user_at: nil) } scope :hidden_by_administration, -> { where.not(hidden_by_administration_at: nil) } scope :hidden_by_expired, -> { where.not(hidden_by_expired_at: nil) } - scope :visible_by_user, -> { where(for_procedure_preview: false).where(hidden_by_user_at: nil, editing_fork_origin_id: nil).where(hidden_by_expired_at: nil) } + scope :visible_by_user, -> { where(for_procedure_preview: false, hidden_by_user_at: nil, editing_fork_origin_id: nil, hidden_by_expired_at: nil) } scope :visible_by_administration, -> { state_not_brouillon .where(hidden_by_administration_at: nil)