forked from jeremydaly/dynamodb-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate that removed fields are not required
Fixes jeremydaly#255 Defining a table attribute with `required: true` should mean that values always exist for that field (barring extraneous factors like schema changes and writes that may not go through this library). Updates may or may not specify a new value, but that new value should not be null, and the field cannot be removed outright. This fixes two cases of this bug: 1) You can remove a `required: true` value by passing $remove: attr or `$remove: [attr]` 2) You can remove a `required: true` value by passing `attr: ''` if `removeNullAttributes` is set.
- Loading branch information
1 parent
a86b7a8
commit effc735
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters