mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 13:03:02 +12:00
fix: delete ash_notifications from pdict after reading
This commit is contained in:
parent
de7bd3576a
commit
f8fc4cd521
2 changed files with 3 additions and 3 deletions
|
@ -652,8 +652,8 @@ defmodule Ash.Actions.Create.Bulk do
|
|||
|
||||
notifications =
|
||||
if opts[:notify?] do
|
||||
process_notifications = Process.get(:ash_notifications, [])
|
||||
bulk_notifications = Process.get({:bulk_create_notifications, ref}) || []
|
||||
process_notifications = Process.delete(:ash_notifications) || []
|
||||
bulk_notifications = Process.delete({:bulk_create_notifications, ref}) || []
|
||||
|
||||
if opts[:return_notifications?] do
|
||||
process_notifications ++ bulk_notifications
|
||||
|
|
|
@ -3225,7 +3225,7 @@ defmodule Ash.Changeset do
|
|||
|
||||
notifications =
|
||||
if instructions[:gather_notifications?] do
|
||||
Enum.concat(List.wrap(Process.get(:ash_notifications, [])), notifications)
|
||||
Enum.concat(List.wrap(Process.delete(:ash_notifications) || []), notifications)
|
||||
else
|
||||
notifications
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue