adding a safeguard into flags upgrade script @baris

v1.18.x
Julian Lam 8 years ago
parent 367078056e
commit a13c6f8c65

@ -345,6 +345,11 @@ Upgrade.upgrade = function (callback) {
return next(err);
}
// Adding in another check here in case a post was improperly dismissed (flag count > 1 but no flags in db)
if (!data.uids.length || !data.reasons.length) {
setInterval(next);
}
// Just take the first entry
var datetime = data.uids[0].score;
var reason = data.reasons[0].split(':')[1];

Loading…
Cancel
Save