FindOrCreate missing error callback

This commit is contained in:
Diana Lau 2017-03-20 10:32:09 -04:00
parent 6f8ecfdf5c
commit eb2cb315e6
1 changed files with 1 additions and 0 deletions

View File

@ -1067,6 +1067,7 @@ DataAccessObject.findOrCreate = function findOrCreate(query, data, options, cb)
function _findOrCreate(query, data, currentInstance) {
var modelName = self.modelName;
function findOrCreateCallback(err, data, created) {
if (err) return cb(err);
var context = {
Model: Model,
data: data,