Skip to content

Node.js based forum software built for the modern web

adding conditional to upgrade script to handle cases where an upgrade is performed on a flag that is already in database

Julian Lam4df8832c8db5
diff --git a/src/upgrade.js b/src/upgrade.js
index 8dce35b901..12939ad99d 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -385,7 +385,14 @@ Upgrade.upgrade = function (callback) {
setImmediate(next);
}
}
- ], next);
+ ], function (err) {
+ if (err && err.message === '[[error:already-flagged]]') {
+ // Already flagged, no need to parse, but not an error
+ next();
+ } else {
+ next(err);
+ }
+ });
});
}, next);
});