fix: don't cast notloaded/forbidden values at runtime

This commit is contained in:
Zach Daniel 2023-08-21 11:35:00 -04:00
parent 4adbd47191
commit 356fa3a780

View file

@ -360,6 +360,12 @@ defmodule Ash.Actions.Helpers do
nil ->
{:cont, {:ok, record}}
%Ash.NotLoaded{} ->
{:cont, {:ok, record}}
%Ash.ForbiddenField{} ->
{:cont, {:ok, record}}
value ->
case Ash.Type.cast_stored(
attr.type,