mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: check changeset.valid?
properly on destroys
This commit is contained in:
parent
dbb9dd4c98
commit
c9d63d2936
1 changed files with 37 additions and 33 deletions
|
@ -280,7 +280,11 @@ defmodule Ash.Actions.Destroy do
|
|||
|
||||
changeset
|
||||
|> Ash.Changeset.put_context(:private, %{actor: actor, authorize?: authorize?})
|
||||
|> Ash.Changeset.with_hooks(fn changeset ->
|
||||
|> Ash.Changeset.with_hooks(fn
|
||||
%{valid?: false} = changeset ->
|
||||
{:error, changeset}
|
||||
|
||||
changeset ->
|
||||
cond do
|
||||
action.manual ->
|
||||
{mod, opts} = action.manual
|
||||
|
|
Loading…
Reference in a new issue