mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 13:03:02 +12:00
chore: fix error code in embeddable type
This commit is contained in:
parent
201687163f
commit
beb8ff7602
1 changed files with 20 additions and 13 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue