From bb9b9aea370f8362918e169f7d275e01d02f7952 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Mon, 13 Nov 2023 17:11:43 -0500 Subject: [PATCH] fix: properly return constraints in aggregate get_type --- lib/ash/query/aggregate.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ash/query/aggregate.ex b/lib/ash/query/aggregate.ex index c12297ad..930673cb 100644 --- a/lib/ash/query/aggregate.ex +++ b/lib/ash/query/aggregate.ex @@ -235,7 +235,8 @@ defmodule Ash.Query.Aggregate do defp validate_uniq(_, _), do: :ok - defp get_type(:custom, type, _, _attribute_constraints, _provided_constraints), do: {:ok, type} + defp get_type(:custom, type, _, _attribute_constraints, provided_constraints), + do: {:ok, type, provided_constraints || []} defp get_type(kind, _, attribute_type, attribute_constraints, provided_constraints) do kind_to_type(kind, attribute_type, attribute_constraints || provided_constraints)