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
@sylver sylver force-pushed the sylver:fix-9531 branch from a74d63d to 694457b Jun 14, 2018
@codecov
Copy link

@codecov 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 sequelize/orm Jun 15, 2018
@sushantdhiman sushantdhiman merged commit 15ce72b into sequelize:master Jun 15, 2018
4 checks passed
4 checks passed
@codecov
codecov/patch 100% of diff hit (target 95.94%)
Details
@codecov
codecov/project 95.95% (+<.01%) compared to 9fb32c2
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants