diff --git a/lib/ash/embeddable_type.ex b/lib/ash/embeddable_type.ex index cf255037..6d186b9f 100644 --- a/lib/ash/embeddable_type.ex +++ b/lib/ash/embeddable_type.ex @@ -744,21 +744,28 @@ defmodule Ash.EmbeddableType do |> if do :ok else - {:not_atomic, - """ - Embedded attributes do not support atomic updates unless one of the following is true: - - - it has no primary key - - `constraints[:on_update]` is set to `:replace` - - Or all of the following are true: - - - the update action accepts all public attributes and has no changes - - there are no changes or validations on the action - - there are no notifiers, or relationships defined on the resource """} - """ + :error end else + :error + end + |> case do + :ok -> + :ok + :error -> + {:not_atomic, + """ + Embedded attributes do not support atomic updates unless one of the following is true: + + - it has no primary key + - `constraints[:on_update]` is set to `:replace` + + Or all of the following are true: + + - the update action accepts all public attributes and has no changes + - there are no changes or validations on the action + - there are no notifiers, or relationships defined on the resource """} + """} end end