diff --git a/lib/ash/actions/destroy/bulk.ex b/lib/ash/actions/destroy/bulk.ex index 425eba21..63b821cf 100644 --- a/lib/ash/actions/destroy/bulk.ex +++ b/lib/ash/actions/destroy/bulk.ex @@ -102,17 +102,17 @@ defmodule Ash.Actions.Destroy.Bulk do {:not_atomic, "Manual read actions cannot be updated atomically"} Ash.DataLayer.data_layer_can?(query.resource, :destroy_query) -> - private_context = Map.new(Keyword.take(opts, [:actor, :tenant, :authorize])) + private_context = Map.new(Keyword.take(opts, [:actor, :tenant, :authorize])) - opts = - Keyword.update( - opts, - :context, - %{private: private_context}, - fn context -> - Map.update(context, :private, private_context, &Map.merge(&1, private_context)) - end - ) + opts = + Keyword.update( + opts, + :context, + %{private: private_context}, + fn context -> + Map.update(context, :private, private_context, &Map.merge(&1, private_context)) + end + ) Ash.Changeset.fully_atomic_changeset(query.resource, action, input, opts) diff --git a/lib/ash/actions/managed_relationships.ex b/lib/ash/actions/managed_relationships.ex index 7719dde9..057b0f5d 100644 --- a/lib/ash/actions/managed_relationships.ex +++ b/lib/ash/actions/managed_relationships.ex @@ -439,10 +439,9 @@ defmodule Ash.Actions.ManagedRelationships do ) end end - - catch - {DBConnection, ref, error} -> - throw({DBConnection, ref, set_error_path(error, relationship, index, opts)}) + catch + {DBConnection, ref, error} -> + throw({DBConnection, ref, set_error_path(error, relationship, index, opts)}) end defp do_create_belongs_to_record( @@ -633,7 +632,6 @@ defmodule Ash.Actions.ManagedRelationships do catch {DBConnection, ref, error} -> throw({DBConnection, ref, set_error_path(error, relationship, input_index, opts)}) - end end )