mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
fix: correctly handle errors in validate_required_belongs_to (#276)
This commit is contained in:
parent
9613ab812c
commit
4113595f69
1 changed files with 2 additions and 0 deletions
|
@ -272,6 +272,8 @@ defmodule Ash.Actions.ManagedRelationships do
|
|||
end
|
||||
end
|
||||
|
||||
defp validate_required_belongs_to({:error, error}), do: {:error, error}
|
||||
|
||||
defp validate_required_belongs_to({changeset, instructions}) do
|
||||
changeset.resource
|
||||
|> Ash.Resource.Info.relationships()
|
||||
|
|
Loading…
Reference in a new issue