mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: don't use list inputs in belongs_to managed
This commit is contained in:
parent
6a189df2a0
commit
a382a8ae20
1 changed files with 4 additions and 4 deletions
|
@ -71,10 +71,10 @@ defmodule Ash.Actions.ManagedRelationships do
|
|||
current_value =
|
||||
case Map.get(changeset.data, relationship.name) do
|
||||
%Ash.NotLoaded{} ->
|
||||
case relationship.cardinality do
|
||||
:many -> []
|
||||
:one -> nil
|
||||
end
|
||||
nil
|
||||
|
||||
other when is_list(other) ->
|
||||
Enum.at(other, 0)
|
||||
|
||||
other ->
|
||||
other
|
||||
|
|
Loading…
Reference in a new issue