fix migration script

This commit is contained in:
zadam
2019-11-12 21:32:35 +01:00
parent 7bd1d8feb4
commit c49c69f824
3 changed files with 10 additions and 36 deletions

View File

@@ -32,12 +32,17 @@ async function findAndFixIssues(query, fixerCb) {
for (const res of results) {
const autoFix = await optionsService.getOptionBool('autoFixConsistencyIssues');
await fixerCb(res, autoFix);
try {
await fixerCb(res, autoFix);
if (autoFix) {
fixedIssues = true;
if (autoFix) {
fixedIssues = true;
} else {
unrecoveredConsistencyErrors = true;
}
}
else {
catch (e) {
logError(`Fixer failed with ${e.message} ${e.stack}`);
unrecoveredConsistencyErrors = true;
}
}