fix: return records from batches if items have after action hooks

This commit is contained in:
Zach Daniel 2023-10-16 16:30:15 -04:00
parent f53626e65d
commit b2c7048359

View file

@ -1229,7 +1229,7 @@ defmodule Ash.Actions.Create.Bulk do
must_return_records? = must_return_records? =
state.must_return_records? || state.must_return_records? ||
Enum.any?(batch, fn item -> Enum.any?(batch, fn item ->
item.relationships not in [nil, %{}] item.relationships not in [nil, %{}] || !Enum.empty?(item.after_action)
end) || function_exported?(module, :after_batch, 3) end) || function_exported?(module, :after_batch, 3)
%{ %{