Skip to content

Commit d81ccf0

Browse files
committed
fix: special case ci_strings as strings in type casting
1 parent 7686715 commit d81ccf0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ash/query/type.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ defmodule Ash.Query.Type do
2828
end
2929
end
3030

31-
def try_cast(%Ash.CiString{} = str, :string, _constraints), do: {:ok, str}
31+
def try_cast(%Ash.CiString{} = str, type, _constraints) when type in [:string, Ash.Type.String],
32+
do: {:ok, str}
33+
3234
def try_cast(value, :number, _constraints) when is_number(value), do: {:ok, value}
3335
def try_cast(value, :any, _constraints), do: {:ok, value}
3436

0 commit comments

Comments
 (0)