From d72e00fc9cf588eb39f4312141e1e73ab053be94 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Thu, 9 Feb 2023 17:50:06 -0500 Subject: [PATCH] chore: remove bad deprecation warning fix: `nil` as page_opts is acceptable --- lib/ash/api/api.ex | 4 ++-- lib/ash/query/query.ex | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ash/api/api.ex b/lib/ash/api/api.ex index aa79479d..4cbec539 100644 --- a/lib/ash/api/api.ex +++ b/lib/ash/api/api.ex @@ -183,8 +183,8 @@ defmodule Ash.Api do @doc false def page_opts(page_opts) do - if page_opts == false do - {:ok, false} + if page_opts in [false, nil] do + {:ok, page_opts} else if page_opts[:after] || page_opts[:before] do validate_or_error(page_opts, @keyset_page_opts) diff --git a/lib/ash/query/query.ex b/lib/ash/query/query.ex index aa87096b..c389fd7c 100644 --- a/lib/ash/query/query.ex +++ b/lib/ash/query/query.ex @@ -1513,7 +1513,6 @@ defmodule Ash.Query do atom | list(atom), Ash.Query.t() | Keyword.t() | nil ) :: t() - @deprecated "use `aggregate/5` instead" def aggregate( query, name,