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"} {:not_atomic, "Manual read actions cannot be updated atomically"}
Ash.DataLayer.data_layer_can?(query.resource, :destroy_query) -> 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 = opts =
Keyword.update( Keyword.update(
opts, opts,
:context, :context,
%{private: private_context}, %{private: private_context},
fn context -> fn context ->
Map.update(context, :private, private_context, &Map.merge(&1, private_context)) Map.update(context, :private, private_context, &Map.merge(&1, private_context))
end end
) )
Ash.Changeset.fully_atomic_changeset(query.resource, action, input, opts) Ash.Changeset.fully_atomic_changeset(query.resource, action, input, opts)

View file

@ -439,10 +439,9 @@ defmodule Ash.Actions.ManagedRelationships do
) )
end end
end end
catch
catch {DBConnection, ref, error} ->
{DBConnection, ref, error} -> throw({DBConnection, ref, set_error_path(error, relationship, index, opts)})
throw({DBConnection, ref, set_error_path(error, relationship, index, opts)})
end end
defp do_create_belongs_to_record( defp do_create_belongs_to_record(
@ -633,7 +632,6 @@ defmodule Ash.Actions.ManagedRelationships do
catch catch
{DBConnection, ref, error} -> {DBConnection, ref, error} ->
throw({DBConnection, ref, set_error_path(error, relationship, input_index, opts)}) throw({DBConnection, ref, set_error_path(error, relationship, input_index, opts)})
end end
end end
) )