mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-15 00:50:48 +01:00
adding conditional to upgrade script to handle cases where an upgrade is performed on a flag that is already in database
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user