File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -927,15 +927,12 @@ defmodule AshJsonApi.Request do
927
927
when is_list ( value ) do
928
928
value
929
929
|> Stream . map ( & relationship_change_value ( & 1 ) )
930
- |> Enum . reduce ( { :ok , [ ] } , fn
930
+ |> Enum . reduce_while ( { :ok , [ ] } , fn
931
931
{ :ok , change } , { :ok , changes } ->
932
- { :ok , [ change | changes ] }
932
+ { :cont , { : ok, [ change | changes ] } }
933
933
934
934
{ :error , change } , _ ->
935
- { :error , change }
936
-
937
- _ , { :error , change } ->
938
- { :error , change }
935
+ { :halt , { :error , change } }
939
936
end )
940
937
|> case do
941
938
{ :ok , changes } ->
@@ -957,8 +954,8 @@ defmodule AshJsonApi.Request do
957
954
{ :ok , nil }
958
955
end
959
956
960
- defp relationship_change_value ( _ ) do
961
- :error
957
+ defp relationship_change_value ( value ) do
958
+ { :error , value }
962
959
end
963
960
964
961
defp url ( conn ) do
You can’t perform that action at this time.
0 commit comments