不要怂,就是干,撸起袖子干!

Commit 78c58323 by Mick Hansen

Merge pull request #2841 from garrett-gottlieb/patch-2

fixes #2840
2 parents 3524385e a7fc1921
Showing with 1 additions and 1 deletions
...@@ -275,7 +275,7 @@ module.exports = (function() { ...@@ -275,7 +275,7 @@ module.exports = (function() {
field + ' must be unique', 'unique violation', field, value)); field + ' must be unique', 'unique violation', field, value));
}); });
if (this.callee.__options && this.callee.__options.uniqueKeys) { if (this.callee && this.callee.__options && this.callee.__options.uniqueKeys) {
Utils._.forOwn(this.callee.__options.uniqueKeys, function(constraint) { Utils._.forOwn(this.callee.__options.uniqueKeys, function(constraint) {
if (Utils._.isEqual(constraint.fields, Object.keys(fields)) && !!constraint.msg) { if (Utils._.isEqual(constraint.fields, Object.keys(fields)) && !!constraint.msg) {
message = constraint.msg; message = constraint.msg;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!