mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: ensure that from
is properly set on all notifications
fix: typo in bulk destroy not clearing ash_started_transaction state
This commit is contained in:
parent
7702cdc2f6
commit
c7b861c511
3 changed files with 3 additions and 4 deletions
|
@ -344,7 +344,7 @@ defmodule Ash.Actions.Destroy.Bulk do
|
|||
end
|
||||
after
|
||||
if notify? do
|
||||
Process.delete(:ash_started_transaction)
|
||||
Process.delete(:ash_started_transaction?)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -313,7 +313,6 @@ defmodule Ash.Actions.Helpers do
|
|||
for: Ash.Resource.Info.notifiers(changeset.resource) ++ changeset.action.notifiers,
|
||||
data: result,
|
||||
changeset: changeset,
|
||||
from: self(),
|
||||
metadata: opts[:notification_metadata] || %{}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -39,12 +39,12 @@ defmodule Ash.Notifier do
|
|||
case notification.for do
|
||||
nil ->
|
||||
for notifier <- Ash.Resource.Info.notifiers(resource) do
|
||||
notifier.notify(notification)
|
||||
notifier.notify(%{notification | from: self()})
|
||||
end
|
||||
|
||||
allowed_notifiers ->
|
||||
for notifier <- Enum.uniq(List.wrap(allowed_notifiers)) do
|
||||
notifier.notify(notification)
|
||||
notifier.notify(%{notification | from: self()})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue