mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: fix dialyzer
This commit is contained in:
parent
084857bf83
commit
3c6c60f594
2 changed files with 2 additions and 16 deletions
|
@ -1104,21 +1104,6 @@ defmodule Ash.Filter do
|
|||
|
||||
add_aggregate_expression(context, nested_statement, field, expression)
|
||||
|
||||
function_module = get_function(field, Ash.Resource.data_layer_functions(context.resource)) ->
|
||||
with {:ok, args} <-
|
||||
hydrate_refs(List.wrap(nested_statement), context.resource, context.aggregates),
|
||||
{:ok, function} <-
|
||||
Function.new(
|
||||
function_module,
|
||||
args,
|
||||
%Ref{
|
||||
relationship_path: context.relationship_path,
|
||||
resource: context.resource
|
||||
}
|
||||
) do
|
||||
{:ok, Expression.optimized_new(:and, expression, function)}
|
||||
end
|
||||
|
||||
(op_module = get_operator(field, Ash.Resource.data_layer_operators(context.resource))) &&
|
||||
match?([_, _ | _], nested_statement) ->
|
||||
with {:ok, [left, right]} <-
|
||||
|
|
|
@ -143,7 +143,8 @@ defmodule Ash.Resource do
|
|||
end
|
||||
|
||||
@doc "Get a relationship by name or path"
|
||||
@spec relationship(Ash.resource(), atom | [atom]) :: Ash.relationship() | nil
|
||||
@spec relationship(Ash.resource(), atom | String.t() | [atom | String.t()]) ::
|
||||
Ash.relationship() | nil
|
||||
def relationship(resource, [name]) do
|
||||
relationship(resource, name)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue