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

fix(BelongsToMany): catch EmptyResultError in add* and set* accessors #9535

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

sylver
Copy link
Contributor

@sylver sylver commented Jun 14, 2018

When the rejectOnEmpty flag is set in a model, an EmptyResultError is raised during a findAll
promise in add* and set* accessors of the BelongsToMany association. This fix prevents it by
catching only this error and throwing any unexpected others.

fix #9531

When the `rejectOnEmpty` flag is set in a model, an `EmptyResultError` is raised during a `findAll`
promise in add* and set* accessors of the BelongsToMany association. This fix prevents it by
catching only this error and throwing any unexpected others.

fix #9531
@codecov
Copy link

codecov bot commented Jun 14, 2018

Codecov Report

Merging #9535 into master will increase coverage by <.01%.
The diff coverage is 100%.

@sushantdhiman sushantdhiman requested a review from a team June 15, 2018 04:29
@sushantdhiman sushantdhiman merged commit 15ce72b into sequelize:master Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants