improvement: use wrap_list for where in changes.change (#926)

This commit is contained in:
Dmitry Maganov 2024-03-12 19:02:43 +02:00 committed by GitHub
parent 8df5d5fd92
commit b75327445c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ defmodule Ash.Resource.Change do
type: {:wrap_list, {:in, [:create, :update, :destroy]}},
default: [:create, :update],
doc: """
The action types the validation should run on. Destroy actions are omitted by default as most changes don't make sense for a destroy.
The action types the change should run on. Destroy actions are omitted by default as most changes don't make sense for a destroy.
"""
],
only_when_valid?: [
@ -46,13 +46,13 @@ defmodule Ash.Resource.Change do
],
where: [
type:
{:list,
{:wrap_list,
{:spark_function_behaviour, Ash.Resource.Validation, Ash.Resource.Validation.Builtins,
{Ash.Resource.Validation.Function, 1}}},
required: false,
default: [],
doc: """
Validations that should pass in order for this validation to apply. These validations failing will result in this validation being ignored.
Validations that should pass in order for this change to apply. These validations failing will result in this change being ignored.
"""
],
always_atomic?: [