mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-04 23:00:31 +01:00
fixing upgrade script if order is not set
This commit is contained in:
@@ -864,6 +864,12 @@ Upgrade.upgrade = function(callback) {
|
||||
if(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);
|
||||
});
|
||||
}, function(err) {
|
||||
|
||||
Reference in New Issue
Block a user