mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
improvement: trim whitespace in uuid
This commit is contained in:
parent
ba6b4202f9
commit
0ef51ce9e6
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,10 @@ defmodule Ash.Type.UUID do
|
|||
def storage_type, do: :binary_id
|
||||
|
||||
@impl true
|
||||
def cast_input(value, _) when is_binary(value) do
|
||||
Ecto.Type.cast(:binary_id, String.trim(value))
|
||||
end
|
||||
|
||||
def cast_input(value, _) do
|
||||
Ecto.Type.cast(:binary_id, value)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue