mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: abort bulk updates on before transaction hook errors
This commit is contained in:
parent
3a20262db2
commit
f3943acdba
1 changed files with 10 additions and 0 deletions
|
@ -1353,6 +1353,16 @@ defmodule Ash.Actions.Update.Bulk do
|
|||
end
|
||||
end)
|
||||
|
||||
batch =
|
||||
Enum.reject(batch, fn
|
||||
%{valid?: false} = changeset ->
|
||||
store_error(ref, changeset, opts)
|
||||
true
|
||||
|
||||
_changeset ->
|
||||
false
|
||||
end)
|
||||
|
||||
must_be_simple_results =
|
||||
Enum.flat_map(must_be_simple, fn changeset ->
|
||||
case Ash.Actions.Update.run(
|
||||
|
|
Loading…
Reference in a new issue