diff --git a/lib/ash/expr/expr.ex b/lib/ash/expr/expr.ex index ffedaabaa..e79f03638 100644 --- a/lib/ash/expr/expr.ex +++ b/lib/ash/expr/expr.ex @@ -55,6 +55,7 @@ defmodule Ash.Expr do is_struct(value, Ash.Query.Exists) or is_struct(value, Ash.Query.Parent) or is_struct(value, Ash.Query.UpsertConflict) or + is_struct(value, Ash.CustomExpression) or (is_struct(value) and is_map_key(value, :__predicate__?)) do true end @@ -771,7 +772,6 @@ defmodule Ash.Expr do expr end - def do_expr( {:&, _, _} = expr, _ diff --git a/lib/ash/query/query.ex b/lib/ash/query/query.ex index aa742ad3b..ab02b048f 100644 --- a/lib/ash/query/query.ex +++ b/lib/ash/query/query.ex @@ -2674,6 +2674,7 @@ defmodule Ash.Query do case filter do {:ok, filter} -> + case Ash.Filter.hydrate_refs( filter, %{