mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 21:43:02 +12:00
fix: persist a nil actor properly
This commit is contained in:
parent
7518168357
commit
3bcf731eea
1 changed files with 3 additions and 5 deletions
|
@ -24,8 +24,7 @@ defmodule Ash.Actions.Helpers do
|
||||||
private: %{
|
private: %{
|
||||||
actor: actor
|
actor: actor
|
||||||
}
|
}
|
||||||
}
|
} ->
|
||||||
when not is_nil(actor) ->
|
|
||||||
Keyword.put_new(opts, :actor, actor)
|
Keyword.put_new(opts, :actor, actor)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -38,8 +37,7 @@ defmodule Ash.Actions.Helpers do
|
||||||
private: %{
|
private: %{
|
||||||
authorize?: authorize?
|
authorize?: authorize?
|
||||||
}
|
}
|
||||||
}
|
} ->
|
||||||
when is_boolean(authorize?) ->
|
|
||||||
Keyword.put_new(opts, :authorize?, authorize?)
|
Keyword.put_new(opts, :authorize?, authorize?)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -105,7 +103,7 @@ defmodule Ash.Actions.Helpers do
|
||||||
opts
|
opts
|
||||||
else
|
else
|
||||||
case Process.get(:ash_authorize?) do
|
case Process.get(:ash_authorize?) do
|
||||||
{:authorize?, value} when is_boolean(value) ->
|
{:authorize?, value} ->
|
||||||
Keyword.put(opts, :authorize?, value)
|
Keyword.put(opts, :authorize?, value)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
|
|
Loading…
Reference in a new issue