fix: use action from changeset (#1273)

This commit is contained in:
Barnabas Jovanovics 2024-07-02 13:22:25 +02:00 committed by GitHub
parent e991575eb5
commit f7397160b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,7 +209,7 @@ defmodule Ash.Actions.Update.Bulk do
if (has_after_batch_hooks? || !Enum.empty?(atomic_changeset.after_action)) &&
Keyword.get(opts, :transaction, true) do
Ash.DataLayer.transaction(
List.wrap(atomic_changeset.resource) ++ action.touches_resources,
List.wrap(atomic_changeset.resource) ++ atomic_changeset.action.touches_resources,
fn ->
do_atomic_update(query, atomic_changeset, has_after_batch_hooks?, input, opts)
end,