mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: simple equality filter should not traverse or
s
This commit is contained in:
parent
51d0eeb08b
commit
ba1fa4c6d5
1 changed files with 5 additions and 3 deletions
|
@ -783,13 +783,15 @@ defmodule Ash.Filter do
|
|||
"""
|
||||
def find_simple_equality_predicate(expression, attribute) do
|
||||
expression
|
||||
|> find(&simple_eq?(&1, attribute))
|
||||
|> find(&simple_eq?(&1, attribute), false)
|
||||
|> case do
|
||||
nil ->
|
||||
nil
|
||||
|
||||
%{right: right} ->
|
||||
right
|
||||
%{right: right, left: left} ->
|
||||
Enum.find([right, left], fn value ->
|
||||
!Ash.Filter.TemplateHelpers.expr?(value)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue