From 3bcf731eea3615e0144a7b1659ccccc0739dec23 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Tue, 9 Aug 2022 21:32:32 -0400 Subject: [PATCH] fix: persist a nil actor properly --- lib/ash/actions/helpers.ex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ash/actions/helpers.ex b/lib/ash/actions/helpers.ex index f559d11e..662d9457 100644 --- a/lib/ash/actions/helpers.ex +++ b/lib/ash/actions/helpers.ex @@ -24,8 +24,7 @@ defmodule Ash.Actions.Helpers do private: %{ actor: actor } - } - when not is_nil(actor) -> + } -> Keyword.put_new(opts, :actor, actor) _ -> @@ -38,8 +37,7 @@ defmodule Ash.Actions.Helpers do private: %{ authorize?: authorize? } - } - when is_boolean(authorize?) -> + } -> Keyword.put_new(opts, :authorize?, authorize?) _ -> @@ -105,7 +103,7 @@ defmodule Ash.Actions.Helpers do opts else case Process.get(:ash_authorize?) do - {:authorize?, value} when is_boolean(value) -> + {:authorize?, value} -> Keyword.put(opts, :authorize?, value) _ ->