Skip to content

Commit

Permalink
fix: ensure repo_opts is passed through to repo.all/2
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Oct 23, 2024
1 parent fe62a09 commit c7aa5f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/data_layer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1362,15 +1362,15 @@ defmodule AshPostgres.DataLayer do
%{expression_accumulator: %AshSql.Expr.ExprInfo{has_error?: true}} ->
# if the query could produce an error
# we must run it even if we will just be returning the original data.
repo.all(query)
repo.all(query, repo_opts)

_ ->
:ok
end

{:ok, [changeset.data]}
else
{:ok, repo.all(query)}
{:ok, repo.all(query, repo_opts)}
end
else
:ok
Expand Down

0 comments on commit c7aa5f6

Please sign in to comment.