mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: don't run any before_action
hooks if changeset is invalidated in prior hook
This commit is contained in:
parent
cb29738927
commit
2bdc6efde3
1 changed files with 1 additions and 0 deletions
|
@ -3271,6 +3271,7 @@ defmodule Ash.Changeset do
|
|||
@doc false
|
||||
def run_before_actions(%{before_action: []} = changeset), do: {changeset, %{notifications: []}}
|
||||
|
||||
def run_before_actions(%{valid?: false} = changeset), do: changeset
|
||||
def run_before_actions(changeset) do
|
||||
can_do_atomic? = data_layer_can_do_atomic_for_changest?(changeset)
|
||||
|
||||
|
|
Loading…
Reference in a new issue