diff --git a/lib/dao.js b/lib/dao.js index f4929317..4b6fefa2 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -757,12 +757,12 @@ DataAccessObject.findOrCreate = function findOrCreate(query, data, options, cb) // options has precedence on model-setting if (options.validate === false) { - _findOrCreate(query, data, obj); + return _findOrCreate(query, data, obj); } // only when options.validate is not set, take model-setting into consideration if (options.validate === undefined && Model.settings.automaticValidation === false) { - _findOrCreate(query, data, obj); + return _findOrCreate(query, data, obj); } // validation required