Merge pull request #1270 from strongloop/add-error-callback
FindOrCreate missing error callback
This commit is contained in:
commit
cc3fb8e3f1
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue