Preload user.activity_settings to as it's being used after
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
99dacb6038
commit
74cece5796
@ -23,7 +23,7 @@ defmodule Mobilizon.Service.Workers.SendActivityRecapWorker do
|
|||||||
Repo.transaction(fn ->
|
Repo.transaction(fn ->
|
||||||
Users.stream_users_for_recap()
|
Users.stream_users_for_recap()
|
||||||
|> Enum.to_list()
|
|> Enum.to_list()
|
||||||
|> Repo.preload([:settings])
|
|> Repo.preload([:settings, :activity_settings])
|
||||||
|> Enum.filter(&filter_elegible_users/1)
|
|> Enum.filter(&filter_elegible_users/1)
|
||||||
|> Enum.map(fn %User{} = user ->
|
|> Enum.map(fn %User{} = user ->
|
||||||
%{
|
%{
|
||||||
|
Loading…
Reference in New Issue
Block a user