fix missing findOrCreate error callback
Closes #1226 Resolves #1223 Signed-off-by: Ryan Graham <r.m.graham@gmail.com>
This commit is contained in:
parent
7d45463a22
commit
e9baea77e0
|
@ -1047,6 +1047,7 @@ DataAccessObject.findOrCreate = function findOrCreate(query, data, options, cb)
|
||||||
function _findOrCreate(query, data, currentInstance) {
|
function _findOrCreate(query, data, currentInstance) {
|
||||||
var modelName = self.modelName;
|
var modelName = self.modelName;
|
||||||
function findOrCreateCallback(err, data, created) {
|
function findOrCreateCallback(err, data, created) {
|
||||||
|
if (err) return cb(err);
|
||||||
var context = {
|
var context = {
|
||||||
Model: Model,
|
Model: Model,
|
||||||
data: data,
|
data: data,
|
||||||
|
|
Loading…
Reference in New Issue