From 63ea2045a78ea2d9ff7bfa47b624be68496e25b1 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Fri, 11 Sep 2020 09:46:54 +0200 Subject: [PATCH] Improve admin query on landing --- app/views/root/landing.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 427fb120d..d0636dc25 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -43,7 +43,7 @@ %ul.numbers %li.number .number-value - = number_with_delimiter(Procedure.includes(:administrateurs).publiees_ou_closes.flat_map(&:administrateurs).uniq.count, :locale => :fr) + = number_with_delimiter(AdministrateursProcedure.joins(:procedure).merge(Procedure.publiees_ou_closes).select('distinct administrateur_id').count, :locale => :fr) .number-label< administrations %br<>