mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +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
|
||||
end
|
||||
|
||||
case find_match(
|
||||
List.wrap(current_value),
|
||||
input,
|
||||
pkeys,
|
||||
relationship,
|
||||
opts[:on_no_match] == :match
|
||||
) do
|
||||
match =
|
||||
if input do
|
||||
find_match(
|
||||
List.wrap(current_value),
|
||||
input,
|
||||
pkeys,
|
||||
relationship,
|
||||
opts[:on_no_match] == :match
|
||||
)
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
case match do
|
||||
nil ->
|
||||
case opts[:on_lookup] do
|
||||
:ignore ->
|
||||
|
|
Loading…
Reference in a new issue