chore: fix credo/build

This commit is contained in:
Zach Daniel 2024-06-20 18:43:38 -04:00
parent fae2c728b0
commit cb29738927
2 changed files with 5 additions and 5 deletions

View file

@ -2468,7 +2468,7 @@ defmodule Ash do
Ash.Helpers.expect_options!(opts)
Ash.Helpers.expect_map_or_nil!(opts[:input])
Keyword.put_new(opts, :tenant, Map.get(record.__metadata__, :tenant))
opts = Keyword.put_new(opts, :tenant, Map.get(record.__metadata__, :tenant))
changeset_opts = Keyword.take(opts, Keyword.keys(Ash.Changeset.for_update_opts()))
update_opts = Keyword.take(opts, Keyword.keys(@update_opts_schema))
@ -2521,7 +2521,7 @@ defmodule Ash do
record -> record
end
Keyword.put_new(opts, :tenant, Map.get(data.__metadata__, :tenant))
opts = Keyword.put_new(opts, :tenant, Map.get(data.__metadata__, :tenant))
Ash.Helpers.expect_options!(opts)
changeset =

View file

@ -4903,8 +4903,8 @@ defmodule Ash.Changeset do
) ::
t()
def before_action(changeset, func, opts \\ []) do
changeset = maybe_dirty_hook(changeset, :before_action)
if opts[:prepend?] do
%{changeset | before_action: [func | changeset.before_action]}
else
@ -4924,8 +4924,8 @@ defmodule Ash.Changeset do
Keyword.t()
) :: t()
def before_transaction(changeset, func, opts \\ []) do
changeset = maybe_dirty_hook(changeset, :before_transaction)
if opts[:prepend?] do
%{changeset | before_transaction: [func | changeset.before_transaction]}
else
@ -4946,6 +4946,7 @@ defmodule Ash.Changeset do
) :: t()
def after_action(changeset, func, opts \\ []) do
changeset = maybe_dirty_hook(changeset, :after_action)
if opts[:prepend?] do
%{changeset | after_action: [func | changeset.after_action]}
else
@ -5054,7 +5055,6 @@ defmodule Ash.Changeset do
@spec around_action(t(), around_action_fun()) :: t()
def around_action(changeset, func) do
changeset = maybe_dirty_hook(changeset, :around_action)
%{changeset | around_action: changeset.around_action ++ [func]}
end