diff --git a/src/upgrade.js b/src/upgrade.js index 75265c4643..2cf56f985f 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -231,7 +231,15 @@ Upgrade.upgradeRedis = function(callback) { function updateKeyToHash(key, next) { RDB.get(key, function(err, value) { - RDB.hset('global', newKeys[key], value, next); + if(err) { + return next(err); + } + + if(value === null) { + RDB.hset('global', newKeys[key], 0, next); + } else { + RDB.hset('global', newKeys[key], value, next); + } }); }