chore: format

This commit is contained in:
Zach Daniel 2024-09-12 10:00:08 -04:00
parent 5cf0f6b7d1
commit 95ac815948
2 changed files with 13 additions and 15 deletions

View file

@ -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)

View file

@ -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
)