fix: fetch_attr right

This commit is contained in:
Zach Daniel 2020-04-30 23:16:48 -04:00
parent cf94465996
commit b988632aa3
No known key found for this signature in database
GPG key ID: C377365383138D4B
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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