fix: use a left join for mastodon post

This commit is contained in:
sloane 2025-04-29 13:51:46 -04:00
parent 9c01aef829
commit 36a1cdfab4
Signed by: sloanelybutsurely
SSH key fingerprint: SHA256:8SBnwhl+RY3oEyQxy1a9wByPzxWM0x+/Ejc+sIlY5qQ

View file

@ -88,7 +88,7 @@ defmodule Core.Posts.Post do
def base do
from p in Schema.Post,
as: :posts,
join: mp in assoc(p, :mastodon_post),
left_join: mp in assoc(p, :mastodon_post),
as: :mastodon_posts,
preload: [mastodon_post: mp]
end