fetch all exports at once by groupe_instructeurs_ids

This commit is contained in:
simon lehericey 2021-04-07 09:43:55 +02:00
parent 951d4c0025
commit 8b73d8804c
4 changed files with 13 additions and 13 deletions

View file

@ -4,7 +4,7 @@ FactoryBot.define do
groupe_instructeurs { [association(:groupe_instructeur)] }
after(:build) do |export, _evaluator|
export.key = Export.generate_cache_key(export.groupe_instructeurs)
export.key = Export.generate_cache_key(export.groupe_instructeurs.map(&:id))
end
end
end