mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: don't look for matches for nil
This commit is contained in:
parent
d82ea58dbe
commit
e81028170d
1 changed files with 14 additions and 7 deletions
|
@ -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 ->
|
||||||
|
|
Loading…
Reference in a new issue