forked from YokaiRick/akkoma
activity: use left join instead of inner join when fetching activities that may or may not have a child object
This commit is contained in:
parent
332dc1371b
commit
4aa699271c
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ def get_by_ap_id_with_object(ap_id) do
|
|||
from(
|
||||
activity in Activity,
|
||||
where: fragment("(?)->>'id' = ?", activity.data, ^to_string(ap_id)),
|
||||
inner_join: o in Object,
|
||||
left_join: o in Object,
|
||||
on:
|
||||
fragment(
|
||||
"(?->>'id') = COALESCE((? -> 'object'::text) ->> 'id'::text)",
|
||||
|
|
Loading…
Reference in a new issue