Skip to content

Commit

Permalink
fix: properly get calculation sql
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Jun 17, 2024
1 parent 97e538b commit 54c88a8
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 @@ -2561,7 +2561,7 @@ defmodule AshPostgres.DataLayer do
~s("#{source || name}")

%Ash.Resource.Calculation{name: name} ->
if sql = AshPostgres.DataLayer.Info.calculations_to_sql(name) do
if sql = AshPostgres.DataLayer.Info.calculation_to_sql(resource, name) do
"(" <> sql <> ")"
else
raise ArgumentError,
Expand Down

0 comments on commit 54c88a8

Please sign in to comment.