fix: don't look for matches for nil

This commit is contained in:
Zach Daniel 2021-08-03 00:17:36 -04:00
parent d82ea58dbe
commit e81028170d

View file

@ -84,13 +84,20 @@ defmodule Ash.Actions.ManagedRelationships do
input input
end end
case find_match( match =
if input do
find_match(
List.wrap(current_value), List.wrap(current_value),
input, input,
pkeys, pkeys,
relationship, relationship,
opts[:on_no_match] == :match opts[:on_no_match] == :match
) do )
else
nil
end
case match do
nil -> nil ->
case opts[:on_lookup] do case opts[:on_lookup] do
:ignore -> :ignore ->