mirror of
https://github.com/ash-project/ash.git
synced 2024-09-17 03:53:02 +12:00
fix: pass entire private context to related query in lazy?: true
This commit is contained in:
parent
f7397160b2
commit
17c92bdf3d
4 changed files with 5 additions and 8 deletions
|
@ -35,8 +35,7 @@ if Mix.env() == :test do
|
|||
config :ash, :validate_domain_config_inclusion?, false
|
||||
config :ash, :policies, show_policy_breakdowns?: true
|
||||
|
||||
config :ash, :compatible_foreign_key_types,
|
||||
[
|
||||
{Ash.Type.CiString, Ash.Type.UUID}
|
||||
]
|
||||
config :ash, :compatible_foreign_key_types, [
|
||||
{Ash.Type.CiString, Ash.Type.UUID}
|
||||
]
|
||||
end
|
||||
|
|
|
@ -106,9 +106,7 @@ defmodule Ash.Actions.Read.Relationships do
|
|||
Ash.Domain.Info.related_domain(related_query, relationship, query.domain)
|
||||
)
|
||||
|> Ash.Query.set_tenant(query.tenant)
|
||||
|> Ash.Query.set_context(%{
|
||||
private: %{async_limiter: query.context[:private][:async_limiter]}
|
||||
})}}
|
||||
|> Ash.Query.set_context(%{private: query.context[:private]})}}
|
||||
else
|
||||
related_query(relationship_name, records, related_query, query)
|
||||
end
|
||||
|
|
|
@ -305,7 +305,6 @@ defmodule Ash.Actions.Update do
|
|||
maybe_is: false
|
||||
) do
|
||||
{:ok, true, changeset} ->
|
||||
# foobar
|
||||
changeset
|
||||
|
||||
{:ok, false, error} ->
|
||||
|
|
|
@ -27,6 +27,7 @@ defmodule Ash.Type.UUID do
|
|||
def cast_input(nil, _), do: {:ok, nil}
|
||||
|
||||
def cast_input(%Ash.CiString{string: string}, constraints), do: cast_input(string, constraints)
|
||||
|
||||
def cast_input(value, _) when is_binary(value) do
|
||||
case String.valid?(value) do
|
||||
true -> Ecto.Type.cast(Ecto.UUID, String.trim(value))
|
||||
|
|
Loading…
Reference in a new issue