@@ -813,6 +813,7 @@ defmodule Ash.Changeset do
813813 |> Map . put ( :no_atomic_constraints , opts [ :no_atomic_constraints ] || [ ] )
814814 |> Map . put ( :action_type , action . type )
815815 |> Map . put ( :atomics , opts [ :atomics ] || [ ] )
816+ |> set_private_arguments_for_action ( opts [ :private_arguments ] || % { } )
816817 |> Ash.Changeset . set_tenant ( opts [ :tenant ] )
817818
818819 { changeset , _opts } =
@@ -2044,13 +2045,9 @@ defmodule Ash.Changeset do
20442045
20452046 Ash.Tracer . set_metadata ( opts [ :tracer ] , :changeset , metadata )
20462047
2047- changeset =
2048- Enum . reduce ( opts [ :private_arguments ] || % { } , changeset , fn { k , v } , changeset ->
2049- set_private_argument_for_action ( changeset , k , v )
2050- end )
2051-
20522048 changeset
20532049 |> Map . put ( :action , action )
2050+ |> set_private_arguments_for_action ( opts [ :private_arguments ] || % { } )
20542051 |> handle_errors ( action . error_handler )
20552052 |> set_actor ( opts )
20562053 |> set_authorize ( opts )
@@ -5876,6 +5873,13 @@ defmodule Ash.Changeset do
58765873 )
58775874 end
58785875
5876+ @ doc false
5877+ def set_private_arguments_for_action ( changeset , arguments ) do
5878+ Enum . reduce ( arguments , changeset , fn { k , v } , changeset ->
5879+ set_private_argument_for_action ( changeset , k , v )
5880+ end )
5881+ end
5882+
58795883 defp set_private_argument_for_action ( changeset , argument , value ) do
58805884 do_set_private_argument (
58815885 changeset ,
0 commit comments