Skip to content

Commit

Permalink
fix: properly supply api for context opts
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 26, 2023
1 parent 9c5ea70 commit 698ecfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ash_phoenix/form/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ defmodule AshPhoenix.Form do

{source, opts} =
if opts[:api] || source.api do
Ash.Actions.Helpers.add_process_context(opts[:api], source, opts)
Ash.Actions.Helpers.add_process_context(opts[:api] || source.api, source, opts)
else
{source, opts}
end
Expand Down Expand Up @@ -581,7 +581,7 @@ defmodule AshPhoenix.Form do

{source, opts} =
if opts[:api] || source.api do
Ash.Actions.Helpers.add_process_context(opts[:api], source, opts)
Ash.Actions.Helpers.add_process_context(opts[:api] || source.api, source, opts)
else
{source, opts}
end
Expand Down Expand Up @@ -682,7 +682,7 @@ defmodule AshPhoenix.Form do

{source, opts} =
if opts[:api] || source.api do
Ash.Actions.Helpers.add_process_context(opts[:api], source, opts)
Ash.Actions.Helpers.add_process_context(opts[:api] || source.api, source, opts)
else
{source, opts}
end
Expand Down Expand Up @@ -789,7 +789,7 @@ defmodule AshPhoenix.Form do

{source, opts} =
if opts[:api] || source.api do
Ash.Actions.Helpers.add_process_context(opts[:api], source, opts)
Ash.Actions.Helpers.add_process_context(opts[:api] || source.api, source, opts)
else
{source, opts}
end
Expand Down

0 comments on commit 698ecfb

Please sign in to comment.