Skip to content

Commit

Permalink
fix: subquery aggregate if limit is applied
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Oct 3, 2023
1 parent 07fd992 commit 5fdc81b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/data_layer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ defmodule AshPostgres.DataLayer do
query = default_bindings(query, resource)

query =
if query.distinct do
if query.distinct || query.limit do
query =
query
|> Ecto.Query.exclude(:select)
Expand Down

0 comments on commit 5fdc81b

Please sign in to comment.