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

Handle undefined field on unique constraint error (#10016) #10018

Merged
merged 2 commits into from Oct 11, 2018
Merged

Handle undefined field on unique constraint error (#10016) #10018

merged 2 commits into from Oct 11, 2018

Conversation

@justinkalland
Copy link
Contributor

@justinkalland justinkalland commented Oct 10, 2018

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Change to AbstractQuery.getUniqueConstraintErrorMessage() to handle falsey field. This fixes the TypeError in #10016.

Closes #10016

@codecov
Copy link

@codecov codecov bot commented Oct 10, 2018

Codecov Report

Merging #10018 into master will increase coverage by 7.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10018      +/-   ##
==========================================
+ Coverage   89.29%   96.39%   +7.09%     
==========================================
  Files          61       63       +2     
  Lines        9293     9391      +98     
==========================================
+ Hits         8298     9052     +754     
+ Misses        995      339     -656
Impacted Files Coverage Δ
lib/dialects/sqlite/index.js 100% <ø> (ø) ⬆️
lib/dialects/abstract/index.js 100% <ø> (ø) ⬆️
lib/dialects/postgres/index.js 100% <ø> (ø) ⬆️
lib/dialects/abstract/query.js 91.34% <100%> (ø) ⬆️
lib/dialects/mssql/connection-manager.js 88.6% <0%> (ø)
lib/dialects/mssql/index.js 100% <0%> (ø)
lib/model.js 96.66% <0%> (+0.06%) ⬆️
lib/sequelize.js 96.58% <0%> (+0.62%) ⬆️
lib/query-interface.js 91.11% <0%> (+0.98%) ⬆️
lib/dialects/abstract/query-generator.js 97.65% <0%> (+4.07%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ded9755...68c3a78. Read the comment docs.

@sushantdhiman sushantdhiman merged commit 9b87cb8 into sequelize:master Oct 11, 2018
4 checks passed
@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Oct 11, 2018

Thanks @justinkalland

@justinkalland justinkalland deleted the fix-sqlite-unique-function-index branch Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants