fix: handle manual relationship load results when building query

This commit is contained in:
Zach Daniel 2022-12-07 01:03:29 -05:00
parent 3614fce456
commit 8173f640f0

View file

@ -1350,7 +1350,13 @@ defmodule Ash.Actions.Load do
end end
ids = ids =
Enum.flat_map(related_data, fn data -> Enum.flat_map(related_data, fn
{_, data} ->
data
|> Map.get(source_attribute)
|> List.wrap()
data ->
data data
|> Map.get(source_attribute) |> Map.get(source_attribute)
|> List.wrap() |> List.wrap()