mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: fetch_attr right
This commit is contained in:
parent
cf94465996
commit
b988632aa3
2 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ defmodule Ash.Actions.Create do
|
|||
resource
|
||||
|> Ash.attributes()
|
||||
|> Enum.reduce({%{}, []}, fn attribute, {new_attributes, unwritable_attributes} ->
|
||||
provided_value = fetch_attr(attributes, attribute)
|
||||
provided_value = fetch_attr(attributes, attribute.name)
|
||||
provided? = match?({:ok, _}, provided_value)
|
||||
|
||||
cond do
|
||||
|
|
|
@ -137,7 +137,7 @@ defmodule Ash.Actions.Update do
|
|||
resource
|
||||
|> Ash.attributes()
|
||||
|> Enum.reduce({%{}, []}, fn attribute, {new_attributes, unwritable_attributes} ->
|
||||
provided_value = fetch_attr(attributes, attribute)
|
||||
provided_value = fetch_attr(attributes, attribute.name)
|
||||
provided? = match?({:ok, _}, provided_value)
|
||||
|
||||
cond do
|
||||
|
|
Loading…
Reference in a new issue