mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: invalid function arg parsing w/ ref
This commit is contained in:
parent
59063ff928
commit
ad24164e2e
1 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,9 @@ defmodule Ash.Query.Function do
|
|||
|> Enum.zip(configured_args)
|
||||
|> Enum.with_index()
|
||||
|> Enum.reduce_while({:ok, []}, fn
|
||||
{{%Ash.Query.Ref{} = ref, :ref}, _i}, {:ok, args} ->
|
||||
{:cont, {:ok, [ref | args]}}
|
||||
|
||||
{{arg, :ref}, i}, {:ok, args} when is_atom(arg) ->
|
||||
case Ash.Resource.attribute(ref.resource, arg) do
|
||||
nil ->
|
||||
|
|
Loading…
Reference in a new issue