mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
closes #635
This commit is contained in:
@@ -231,7 +231,15 @@ Upgrade.upgradeRedis = function(callback) {
|
|||||||
|
|
||||||
function updateKeyToHash(key, next) {
|
function updateKeyToHash(key, next) {
|
||||||
RDB.get(key, function(err, value) {
|
RDB.get(key, function(err, value) {
|
||||||
|
if(err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(value === null) {
|
||||||
|
RDB.hset('global', newKeys[key], 0, next);
|
||||||
|
} else {
|
||||||
RDB.hset('global', newKeys[key], value, next);
|
RDB.hset('global', newKeys[key], value, next);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user