mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: don't use ||
when fetching arguments because false || nil
is nil
fixes #722
This commit is contained in:
parent
1042ea14fd
commit
3d72e190b2
1 changed files with 7 additions and 1 deletions
|
@ -573,7 +573,13 @@ defmodule Ash.Filter do
|
|||
get_path(actor || %{}, path)
|
||||
|
||||
{:_arg, field} ->
|
||||
Map.get(args, field) || Map.get(args, to_string(field))
|
||||
case Map.fetch(args, field) do
|
||||
:error ->
|
||||
Map.get(args, to_string(field))
|
||||
|
||||
{:ok, value} ->
|
||||
value
|
||||
end
|
||||
|
||||
{:_context, fields} when is_list(fields) ->
|
||||
get_path(context, fields)
|
||||
|
|
Loading…
Reference in a new issue