Skip to content

Commit

Permalink
fix: handle nil values in Ash.Type.Module
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 19, 2024
1 parent 354e714 commit acb1c61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ash/type/module.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ defmodule Ash.Type.Module do
end

@impl true
def cast_input(nil, _), do: {:ok, nil}

def cast_input(value, _) when is_atom(value) do
if Code.ensure_loaded?(value) do
{:ok, value}
Expand Down

0 comments on commit acb1c61

Please sign in to comment.