Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid an empty ExpressionAttributeValues when only removing attributes on update/save #43

Merged
merged 1 commit into from
Nov 25, 2016

Conversation

pye2k
Copy link
Contributor

@pye2k pye2k commented Nov 2, 2016

For attributes that have persist_nil: false (which is the default setting). Setting their value as nil will remove them from the persisted record.

However when these are the only attributes that are in the update/save request, an empty map would be generated, which subsequently gets rejected by the service.

This fix checks for that condition and prevents empty ExpressionAttributeValues from being sent in the request.

@coveralls
Copy link

coveralls commented Nov 2, 2016

Coverage Status

Changes Unknown when pulling 30c7038 on pye2k:master into * on aws:master*.

@awood45
Copy link
Member

awood45 commented Nov 25, 2016

This looks good - merging, will go out with next release.

@awood45 awood45 merged commit 8a898ae into aws:master Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants