Preload user.activity_settings to as it's being used after

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-04-21 10:21:05 +02:00
parent 99dacb6038
commit 74cece5796
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ defmodule Mobilizon.Service.Workers.SendActivityRecapWorker do
Repo.transaction(fn ->
Users.stream_users_for_recap()
|> Enum.to_list()
|> Repo.preload([:settings])
|> Repo.preload([:settings, :activity_settings])
|> Enum.filter(&filter_elegible_users/1)
|> Enum.map(fn %User{} = user ->
%{