fixing upgrade script if order is not set

v1.18.x
Julian Lam 11 years ago
parent fc53385ede
commit 30e83fdabe

@ -864,6 +864,12 @@ Upgrade.upgrade = function(callback) {
if(err) { if(err) {
return next(err); return next(err);
} }
// If there was no order present, put it at the end
if (!order) {
order = cids.length;
}
db.sortedSetAdd('categories:cid', order, cid, next); db.sortedSetAdd('categories:cid', order, cid, next);
}); });
}, function(err) { }, function(err) {

Loading…
Cancel
Save