Skip to content

Commit

Permalink
fix: properly update sort calculation expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 20, 2024
1 parent acb1c61 commit 8b77f21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ash/actions/read/read.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,7 @@ defmodule Ash.Actions.Read do

{%Ash.Query.Calculation{
module: Ash.Resource.Calculation.Expression,
opts: [expression: expression]
opts: [expr: expression]
} = calc, direction},
{:ok, sort} ->
new_expr =
Expand All @@ -2982,7 +2982,7 @@ defmodule Ash.Actions.Read do
query.domain
)

new_calc = %{calc | opts: [expression: new_expr]}
new_calc = %{calc | opts: [expr: new_expr]}

{:cont, {:ok, [{new_calc, direction} | sort]}}

Expand Down

0 comments on commit 8b77f21

Please sign in to comment.