Ignore unknown setting keys on import

fixes #4059
- Ignore NotFound setting keys
This commit is contained in:
Fabian Becker 2014-09-18 12:48:18 +00:00
parent c38c0cdfe1
commit 4cc1f509ac

View File

@ -265,7 +265,10 @@ utils = {
});
ops.push(models.Settings.edit(tableData, _.extend(internal, {transacting: transaction})).catch(function (error) {
return Promise.reject({raw: error, model: 'setting', data: tableData});
// Ignore NotFound errors
if (!(error instanceof errors.NotFoundError)) {
return Promise.reject({raw: error, model: 'setting', data: tableData});
}
}));
return Promise.settle(ops);