diff --git a/lib/ash/type/uuid.ex b/lib/ash/type/uuid.ex index 7ec857f1..00384aa7 100644 --- a/lib/ash/type/uuid.ex +++ b/lib/ash/type/uuid.ex @@ -20,8 +20,11 @@ defmodule Ash.Type.UUID do end @impl true - def cast_stored(value, _) do + def cast_stored(value, constraints) do Ecto.Type.load(Ecto.UUID, value) + rescue + _e in ArgumentError -> + cast_input(value, constraints) end @impl true