mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 05:23:18 +12:00
fix: more don't cast any types
This commit is contained in:
parent
de8aa43ad6
commit
fedd35fa32
1 changed files with 11 additions and 4 deletions
15
lib/expr.ex
15
lib/expr.ex
|
@ -180,9 +180,7 @@ defmodule AshPostgres.Expr do
|
|||
[condition_type, when_true, when_false] ->
|
||||
[condition_type, when_true, when_false]
|
||||
end
|
||||
|
||||
[condition_type, when_true_type, when_false_type] =
|
||||
Enum.map([condition_type, when_true_type, when_false_type], fn type ->
|
||||
|> Enum.map(fn type ->
|
||||
if type == :any do
|
||||
nil
|
||||
else
|
||||
|
@ -329,7 +327,16 @@ defmodule AshPostgres.Expr do
|
|||
embedded?,
|
||||
type
|
||||
) do
|
||||
[left_type, right_type] = AshPostgres.Types.determine_types(mod, [left, right])
|
||||
[left_type, right_type] =
|
||||
mod
|
||||
|> AshPostgres.Types.determine_types([left, right])
|
||||
|> Enum.map(fn type ->
|
||||
if type == :any do
|
||||
nil
|
||||
else
|
||||
type
|
||||
end
|
||||
end)
|
||||
|
||||
left_expr = do_dynamic_expr(query, left, bindings, pred_embedded? || embedded?, left_type)
|
||||
|
||||
|
|
Loading…
Reference in a new issue