Skip to content

Commit

Permalink
chore: handle nil action in atomic update
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Oct 13, 2024
1 parent 3853d52 commit 716ea01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ash/changeset/changeset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,8 @@ defmodule Ash.Changeset do
changeset
else
allow_nil? =
attribute.allow_nil? and attribute.name not in changeset.action.require_attributes
attribute.allow_nil? and
(is_nil(changeset.action) || attribute.name not in changeset.action.require_attributes)

value =
if allow_nil? || not Ash.Expr.can_return_nil?(value) do
Expand Down

0 comments on commit 716ea01

Please sign in to comment.