From 8b77f21d6920b7ee34c443f5ff0d423283a55b6a Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Thu, 19 Dec 2024 23:07:35 -0500 Subject: [PATCH] fix: properly update sort calculation expressions --- lib/ash/actions/read/read.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ash/actions/read/read.ex b/lib/ash/actions/read/read.ex index 36c8096a0..3544fe32e 100644 --- a/lib/ash/actions/read/read.ex +++ b/lib/ash/actions/read/read.ex @@ -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 = @@ -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]}}