0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #4062 from halfdan/4059-skip-not-found

Ignore unknown setting keys on import
This commit is contained in:
Hannah Wolfe 2014-09-19 16:54:35 +01:00
commit cb9d9b748a

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);