perf(admin): fix N+1 on procedures zones on every admin page

This commit is contained in:
Colin Darie 2024-01-16 17:28:04 +01:00
parent 15e78e94f3
commit e1102ed993
No known key found for this signature in database
GPG key ID: 8C76CADD40253590

View file

@ -139,7 +139,7 @@ class Administrateur < ApplicationRecord
end
def zones
procedures.joins(:zones).flat_map(&:zones).uniq
procedures.includes(:zones).flat_map(&:zones).uniq
end
# required to display feature flags field in manager