handling missing notifications in update script

v1.18.x
Julian Lam 11 years ago
parent 77c2f551d3
commit 01340c87bd

@ -54,7 +54,9 @@ Upgrade.upgrade = function() {
RDB.zrange(key, 0, -1, function(err, nids) {
async.each(nids, function(nid, next) {
notifications.get(nid, null, function(notif_data) {
RDB.zadd(key, notif_data.datetime, nid, next);
if (notif_data) {
RDB.zadd(key, notif_data.datetime, nid, next);
}
});
}, next);
});

Loading…
Cancel
Save