ObjectField({ required: false, nullable: true }) doesn't actually allow null/undefined values unless cast is overridden #10928
Labels
bug
Functionality which is not working as intended
data-models
Issues related to data models and schema changes
Milestone
ObjectField#_cast
will transform anynull
orundefined
values into{}
even ifrequired: false
is set. One example of this is theAdditionalTypesField
that's used inBaseModule
and as of v12,BaseSystem
.I'm good with the defaults, but maybe
_cast
should be updated to account for this options or a note should be made that downstream developers should also implement their own_cast
method.The text was updated successfully, but these errors were encountered: