fix: handle {:ref, ...} tuple in static syntax

This commit is contained in:
Zach Daniel 2023-02-05 17:16:59 -05:00
parent c38c0c6fcb
commit ae46b27f04

View file

@ -2805,6 +2805,17 @@ defmodule Ash.Filter do
do_hydrate_refs(value, context) do_hydrate_refs(value, context)
end end
def do_hydrate_refs({:ref, value}, context) do
do_hydrate_refs(
%Ash.Query.Ref{
attribute: value,
relationship_path: [],
resource: context.root_resource
},
context
)
end
def do_hydrate_refs({key, value}, context) when is_atom(key) do def do_hydrate_refs({key, value}, context) when is_atom(key) do
case do_hydrate_refs(value, context) do case do_hydrate_refs(value, context) do
{:ok, hydrated} -> {:ok, hydrated} ->