fix missing findOrCreate error callback

Closes #1226
Resolves #1223

Signed-off-by: Ryan Graham <r.m.graham@gmail.com>
This commit is contained in:
Ryan Graham 2017-03-16 18:32:47 -07:00
parent 7d45463a22
commit e9baea77e0
No known key found for this signature in database
GPG Key ID: F15A82CDEFD85858
1 changed files with 1 additions and 0 deletions

View File

@ -1047,6 +1047,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,